An instance of this class represents an element in a XML document. To iterate through all occurrences of an XML element in a Text Control document the XmlElementCollection class can be used.

Syntax

public class XmlElement
Public Class XmlElement

Examples

The following example shows how to instantiate a TXTextControl.XmlElement class with either just a specific name, or a specific name and text.

//Create an XmlElement with a specific name
TXTextControl.XmlElement MyXMLElement_withElementName = new TXTextControl.XmlElement("XMLElementName");

//Create an XmlElement with a specific name and text
TXTextControl.XmlElement MyXMLElement_withElementNameAndDescription = new TXTextControl.XmlElement("XMLElementName", "XMLElementDescription");
'Create an XmlElement with a specific name
Dim MyXMLElement_withElementName As TXTextControl.XmlElement = New TXTextControl.XmlElement("XMLElementName")
'Create an XmlElement with a specific name and text
Dim MyXMLElement_withElementNameAndDescription As TXTextControl.XmlElement = New TXTextControl.XmlElement("XMLElementName", "XMLElementDescription")

Constructors

Constructor Description
XmlElement Initializes a new instance of the XmlElement class.

Methods

Method Description
AddChild Adds a new XML element as a sub-element of this element.
GetChildItem Returns an XML Element object that represents a child element of this element.
RemoveChild Removes an XML child element.
Select Selects the text of the XML element.

Properties

Property Description
AutoSelect Determines whether the text of a newly added XML element is automatically selected.
AutoText Determines whether text is automatically created for a newly added XML element that has no text contents.
ElementName Gets the name of an XML element.
Text Specifies the text of the XML element.