how can we go through such kinds of tag in xml like <PopupHTML />
-
hello every one... can you help me to sort out a little problem of xml? how can we go through such kinds of tag in xml like and make it complete pair tag like that using c# this is the sample structure of my XML file... please reply me soon sir thank you... -------------------------------------------------------------- Blank Blank NewField1 15b85c2b-83ca-44ec-8741-22a4dc64f64d http://careers.msn.com/ Careers & Jobs <A href="http://careers.msn.com">Careers & Jobs</A> ... ... ... --------------------------------------------------------------
-
hello every one... can you help me to sort out a little problem of xml? how can we go through such kinds of tag in xml like and make it complete pair tag like that using c# this is the sample structure of my XML file... please reply me soon sir thank you... -------------------------------------------------------------- Blank Blank NewField1 15b85c2b-83ca-44ec-8741-22a4dc64f64d http://careers.msn.com/ Careers & Jobs <A href="http://careers.msn.com">Careers & Jobs</A> ... ... ... --------------------------------------------------------------
You need to read the documentation, and there are a lot of examples available on Code Project and the rest of the internet. Anyways, here is an example: using System; using System.Xml; namespace XmlExample { class Program { static void Main(string[] args) { string xml = "\n" + "\n" + "\t\n" + "\n"; XmlDocument xml_doc = new XmlDocument(); xml_doc.PreserveWhitespace = true; xml_doc.LoadXml(xml); XmlNode node = xml_doc.SelectSingleNode("//nodes/node"); if (node != null) { XmlText text = xml_doc.CreateTextNode("Hello, World!"); node.AppendChild(text); } Console.WriteLine(xml_doc.InnerXml); } } } "We make a living by what we get, we make a life by what we give." --Winston Churchill