Saturday, April 11, 2015

Bootstrap

HTML - CSS - JavaScript
Make sure to add jQuery file above the bootstrap file.

<div class="container-fluid">
Full width container

<div class="container">
Fixed width container

btn Modifier
–Default
–Primary
–Success
–Info
–Warning
–Danger

Saturday, April 4, 2015

Parse XML File


  1. Reference System.XML
  2. Use XmlReader to parse the text string
  3. Use XmlReader to read the xml data

string xmlString =
                @"<bookstore>
                    <book genre='autobox' publishDate='2015-03-04'>
                        <title>Many bottle</title>
                        <author>
                            <firstName>David</firstName>
                            <lastName>Baby<lastName>
                        </author>
                    </book>
                  </bookstore>";

StringBuilder result = new StringBuilder();

using (XmlReader reader = XmlReader.Create(new StringReader(xmlString)))
{
   reader.ReadToFollowing("book");
   reader.MoveToFirstAttribute();
   string genre = reader.Value;
   result.AppendLine("Genre value :" + genre);

   reader.ReadToFollowing("title");
   result.AppendLine("title element :" + reader.ReadElementContentAsString());
}

Console.Write(result);