LoadXml : XmlDocument : XML C# Source Code


Custom Search

C# Source Code » XML » XmlDocument »

 

LoadXml








    
 

using System;
using System.IO;
using System.Xml;
public class BookListing {
    public static void Main() {
        XmlDocument doc = new XmlDocument();
        String entry = "<book genre='biography'" +
         " ISBN='1111111111'><title>my title</title>" +
         "</book>";
        doc.LoadXml(entry);

        StringWriter writer = new StringWriter();
        doc.Save(writer); // to StringWriter
        String strXML = writer.ToString(); // to String
        Console.WriteLine(strXML);
    }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo XML
» XmlDocument