LoadXml

image_pdfimage_print
   
  

using System;
using System.IO;
using System.Xml;
public class BookListing {
    public static void Main() {
        XmlDocument doc = new XmlDocument();
        String entry = "<book genre=&#039;biography&#039;" +
         " ISBN=&#039;1111111111&#039;><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);
    }
}

   
     


This entry was posted in XML-RPC. Bookmark the permalink.