Bearbeiten

Teilen über


XmlElement Data type

Version: Available or changed with runtime version 1.0.

Represents an XML element.

Static methods

The following methods are available on the XmlElement data type.

Method name Description
Create(Text) Creates an XmlElement node.
Create(Text, Text) Creates an XmlElement node.
Create(Text, Text, Any,...) Creates an XmlElement node.
Create(Text, Any,...) Creates an XmlElement node.

Instance methods

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

Method name Description
Add(Any,...) Adds the specified content as a child of this element.
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 element.
AsXmlNode() Converts the node to an XmlNode.
Attributes() Gets a collection of the attributes of this element.
GetChildElements() Gets a list containing the child elements for this element, in document order.
GetChildElements(Text) Gets a list containing the child elements for this element, in document order.
GetChildElements(Text, Text) Gets a list containing the child elements for this element, in document order.
GetChildNodes() Gets a list containing the child elements for this element, in document order.
GetDescendantElements() Gets a list containing the descendant elements for this element, in document order.
GetDescendantElements(Text) Gets a list containing the descendant elements for this element, in document order.
GetDescendantElements(Text, Text) Gets a list containing the descendant elements for this element, in document order.
GetDescendantNodes() Gets a list containing the descendant nodes for this element, in document order.
GetDocument(var XmlDocument) Gets the XmlDocument for this node.
GetNamespaceOfPrefix(Text, var Text) Gets the namespace associated with a particular prefix for this element.
GetParent(var XmlElement) Gets the parent XmlElement of this node.
GetPrefixOfNamespace(Text, var Text) Gets the prefix associated with a namespace URI for this element.
HasAttributes() Gets a boolean value indicating whether this element has at least one attribute.
HasElements() Gets a value indicating whether this element has at least one child element.
InnerText() Gets the concatenated values of the node and all its child nodes.
InnerXml() Gets the markup representing only the child nodes of this node.
IsEmpty() Gets a value indicating whether this element contains no content.
LocalName() Gets the local name of this element.
Name() Gets the fully qualified name of this element.
NamespaceUri() Gets the namespace URI of this element.
Remove() Removes this node from its parent element.
RemoveAllAttributes() Removes the attributes of this element.
RemoveAttribute(Text) Removes the specified attribute from this element.
RemoveAttribute(Text, Text) Removes the specified attribute from this element.
RemoveAttribute(XmlAttribute) Removes the specified attribute from this element.
RemoveNodes() Removes the child nodes from this element.
ReplaceNodes(Any,...) Replaces the children nodes of this element 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.
SetAttribute(Text, Text) Sets the value of the specified attribute or create it if is not part of the element's attribute collection.
SetAttribute(Text, Text, Text) Sets the value of the specified attribute or create it if is not part of the element's attribute collection.
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