XML Files

Opening XML Files

Dim objXMLDocument As New System.XML.XMLDocument 

Saving XML Files


Replacing Nodes


This can select a list of nodes that match an XPath expression
If the XPath expression does not incude a prefix the namespace is assumed to be the empty namespace.
If your XML includes a namespace the this must be added to the XMLNamespaceManager and passed to the SelectNodes method

<xml_label xmlns="http://www.mywebsite.com"> 

System.Xml.XMLNamespaceManager oManager; 
oManager = new System.Xml.XmlNamespaceManager(oXMLDocument.NameTitle);
System.Xml.XMLNodeList oList = oXMLDocument.SelectNodes("//mw:tag1", oManager);

© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext