XMLDocument
Introduced in .NET 1.1
This allows you to browse the nodes in any direction, insert and remove nodes and change the structure on the fly.
Loads the entire XMLDocument into memory.
You can have problems when using this method because the data model is different to XSLT and Xpath
This is based on the Document Object Model (www.w3c.org/DOM)
Access to data in a non-sequential way
Load - loads from a string, stream, text reader, xml reader
LoadXML - loads from a string
If you want a more memory-efficient alternative and you can process the XML bit by bit, consider using the XMLReader and XMLWriter classes.
The XMLDocument class is an XML parser which stores the contents in memory
An XPathNavigator can be created over the content to provide easy access to nodes and values
This class implements W3C level 2 XML DOM core functionality.
Dim objXMLDocument As System.XML.XMLDocument
WIth objXMLDocument
.CreateXMLDeclaration
.InsertBefore
.InsertAfter
.CreateElement
End With
XMLNode
objXMLDocument.ChildNodes.Item(2).InnerXML
.SelectNodes("---") ??
XMLElement
By default an XML element name is determined by the class or member name
For example a class called MyClass with a field named MyFlag produces an XML element tag <MyFlag>
This default behaviur can be changed if you want to give you element a different name.
Dim objXMLElement As System.XML.XMLElement
With objXMLElement
.AppendChild
.InnerText
.SetAttribute
End With
An element can have one or more attributes
XMLAttribute
An element can have one or more attributes
Attributes can be used to control the XML serialization on an object.
<System.Xml.XmlAttribute("name")>
© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext