Redigera

Dela via


XmlDocument Data type

Version: Available or changed with runtime version 1.0.

Represents an XML document.

Static methods

The following methods are available on the XmlDocument data type.

Method name Description
Create() Creates an XmlDocument.
Create(Any,...) Creates an XmlDocument.
ReadFrom(Text, var XmlDocument) Reads and parses the XML document from the given data source.
ReadFrom(Text, XmlReadOptions, var XmlDocument) Reads and parses the XML document from the given data source.
ReadFrom(InStream, var XmlDocument) Reads and parses the XML document from the given data source.
ReadFrom(InStream, XmlReadOptions, var XmlDocument) Reads and parses the XML document from the given data source.

Instance methods

The following methods are available on instances of the XmlDocument data type.

Method name Description
Add(Any,...) Adds the specified content as a child of this document.
AddAfterSelf(Any,...) Adds the specified content immediately after this node.
AddBeforeSelf(Any,...) Adds the specified content immediately before this node.
AddFirst(Any,...) Adds the specified content at the start of the child list of this document.
AsXmlNode() Converts the node to an XmlNode.
GetChildElements() Gets a list containing the child elements for this document, in document order.
GetChildElements(Text) Gets a list containing the child elements for this document, in document order.
GetChildElements(Text, Text) Gets a list containing the child elements for this document, in document order.
GetChildNodes() Gets a list containing the child elements for this document, in document order.
GetDeclaration(var XmlDeclaration) Gets the XML declaration for this document.
GetDescendantElements() Gets a list containing the descendant elements for this document, in document order.
GetDescendantElements(Text) Gets a list containing the descendant elements for this document, in document order.
GetDescendantElements(Text, Text) Gets a list containing the descendant elements for this document, in document order.
GetDescendantNodes() Gets a list containing the descendant nodes for this document, in document order.
GetDocument(var XmlDocument) Gets the XmlDocument for this node.
GetDocumentType(var XmlDocumentType) Gets the Document Type Definition (DTD) for this document.
GetParent(var XmlElement) Gets the parent XmlElement of this node.
GetRoot(var XmlElement) Gets the root element of the XML tree for this document.
NameTable() Gets the XmlNameTable associated with this document.
Remove() Removes this node from its parent element.
RemoveNodes() Removes the child nodes from this document.
ReplaceNodes(Any,...) Replaces the children nodes of this document with the specified content.
ReplaceWith(Any,...) Replaces this node with the specified content.
SelectNodes(Text, var XmlNodeList) Selects a list of nodes matching the XPath expression.
SelectNodes(Text, XmlNamespaceManager, var XmlNodeList) Selects a list of nodes matching the XPath expression.
SelectSingleNode(Text, var XmlNode) Selects the first XmlNode that matches the XPath expression.
SelectSingleNode(Text, XmlNamespaceManager, var XmlNode) Selects the first XmlNode that matches the XPath expression.
SetDeclaration(XmlDeclaration) Sets the XML declaration for this document.
WriteTo(OutStream) Serializes and saves the current node to the given variable.
WriteTo(XmlWriteOptions, OutStream) Serializes and saves the current node to the given variable.
WriteTo(var Text) Serializes and saves the current node to the given variable.
WriteTo(XmlWriteOptions, var Text) Serializes and saves the current node to the given variable.

Get Started with AL
Developing Extensions