removing XML entries
-
i have a XML file and i wish to remove a few nodes from it...I am using the XMLDocument class...How can i do this without loading it into a dataset or something..
-
i have a XML file and i wish to remove a few nodes from it...I am using the XMLDocument class...How can i do this without loading it into a dataset or something..
-
What exaclty are you trying to do. Permanently remove nodes from the document? Copy nodes to nodes outside the document?
like..if i document that was like.. A A A A A A
A
A A A A now suppose i want to remove the field called zipcode.. how do i do that?
-
like..if i document that was like.. A A A A A A
A
A A A A now suppose i want to remove the field called zipcode.. how do i do that?
A A A A A A A A A A A
-
A A A A A A A A A A A
i dunno why im unable to put xml text here
-
i dunno why im unable to put xml text here
Just check "Do not treat <'s as HTML tags". Never forget: "Stay kul and happy" (I.A.)
David's thoughts / dnhsoftware.org / MyHTMLTidy -
Just check "Do not treat <'s as HTML tags". Never forget: "Stay kul and happy" (I.A.)
David's thoughts / dnhsoftware.org / MyHTMLTidyA A A A A A
A
A A A A I want to remove the node called zipcode
-
A A A A A A
A
A A A A I want to remove the node called zipcode
Try this System.Xml.XmlNode node; System.Xml.XmlDocument doc = new XmlDocument(); doc.LoadXml("jon3547408"); this.textBox1.Text=doc.InnerXml; node = doc.SelectSingleNode("person"); node.RemoveChild( doc.SelectSingleNode("person//zip")); textBox1.Text += "\n" + doc.InnerXml;