Initializes a new instance of the XmlAttribute class.
The name of the XML attribute.
The initial value of the XML attribute. Additional children can be added later. Only XmlAttributeText, XmlCharRef, and XmlEntityRef nodes are permitted.
Gets the name of this attribute.
The name of this attribute.
Sets the name of this attribute.
The name of this attribute.
The name of this attribute.
Gets the parent of this node.
The parent of this node.
Inserts a new XML character reference at the specified index.
The character to represent using the reference.
Whether to use the hexadecimal or decimal representation for the reference. If left undefined, decimal is the default.
The index at which the node should be inserted. If no index is specified, the node is inserted at the end of this node's children.
The newly created XML declaration.
Gets this node's children.
Throws an exception if this node cannot have any children. Consult the appropriate subclass documentation for more details.
This node's children.
Inserts a new XML entity reference at the specified index.
The entity to be referenced.
The index at which the node should be inserted. If no index is specified, the node is inserted at the end of this node's children.
The newly created XML declaration.
Inserts the specified node into this node's children at the specified index. The node is not inserted if it is already present. If this node already has a parent, it is removed from that parent.
Note that only XmlCharRef, XmlEntityRef, and XmlCharData nodes can be inserted; otherwise, an exception will be thrown.
The node to insert.
The index at which to insert the node. Nodes at or after the index are shifted to the right. If no index is specified, the node is inserted at the end.
The node inserted into this node's children, or undefined if no node was inserted.
Gets the node that follows this one, or undefined if no such node exists or if this node has no parent.
The node that follows this one, or undefined if no such node exists or if this node has no parent.
Gets the node that is previous to this one, or undefined if no such node exists or if this node has no parent.
The node that is previous to this one, or undefined if no such node exists or if this node has no parent.
Removes this node from its parent if this node has a parent.
This node's parent, or undefined if it has no parent.
Removes the specified node from this node's children.
Note that this node must have at least one child. Attempts to remove the last child node will result in an exception.
The node to remove.
Whether a node was removed.
Removes the node at the specified index from this node's children.
Note that this node must have at least one child. Attempts to remove the last child node will result in an exception.
The index at which the node to be removed is located.
The node that was removed, or undefined if no node was removed.
Inserts a new XML text node at the specified index.
Arbitrary character data.
The index at which the node should be inserted. If no index is specified, the node is inserted at the end of this node's children.
The newly created XML declaration.
Returns an XML string representation of this node.
Formatting options for the string representation.
An XML string representation of this node.
Returns the root node of the current hierarchy. If this node has no parent, this node itself is returned.
The root node of the current hierarchy.
Gets the parent of this node.
Generated using TypeDoc
Represents an XML element attribute.
An XML element attribute is part of the start tag of an element and is structured as follows, where
{name}
is the name of the attribute and{value}
is the value of the attribute:<element {name}="{value}">
The
{name}
value is a property of this node, while the{value}
property consists of the children of this node.XmlAttribute nodes must have at least one child, and can have an unlimited number of XmlAttributeText, XmlCharRef, and XmlEntityRef nodes as children.