XmlNode Class Properties
The following are the XmlNode properties.
Description
This property returns the number of attributes for an XmlNode, as a number.
This property is read-only.
Example
Local XmlDoc &inXMLDoc;
&inXMLDoc = CreateXmlDoc("<?xml version='1.0'?><root/>");
&inXMLDoc.DocumentElement.AddAttribute("first", "John");
&inXMLDoc.DocumentElement.AddAttribute("last", "Public");
&inXMLDoc.DocumentElement.AddAttribute("address", "1234 West Eastland");
For &i = 1 To &inXMLDoc.DocumentElement.AttributesCount
/* do some processing of the attributes here */
End-For;
Description
This property returns the number of child nodes for an XmlNode, as a number.
This property is read-only.
Description
This property returns the location (or position) of a node in the parent's child list, as a number. The root node always returns a 1.
This property is read-only.
Description
This property returns a Boolean value, indicating whether the node is a valid node. Use this property to verify the value of the add or insert XmlNode methods.
This property is read-only.
Example
Local XmlDoc &inXMLDoc;
Local XmlNode &elementNode;
&inXMLDoc = CreateXmlDoc("<?xml version='1.0'?><root/>");
&elementNode = &inXMLDoc.DocumentElement.AddElement("first");
&elementNode = &inXMLDoc.DocumentElement.FindNode("/second");
If &elementNode.IsNull Then
/* do some error processing here, will not find "second" */
End-If;
Description
This property returns the local part of a namespace as a string. The local part is the second part of the namespace entry. If you want access to the first part of a namespace, use the Prefix property.
This property is read-only.
Related Links
Description
This property returns a reference to the namespace URI as a string.
This property is read-only.
Description
This property returns the next child node in an XmlNode, as an XmlNode.
Use the IsNull property to verify that the XmlNode that is returned is valid.
This property is read-only.
Related Links
Description
This property returns the name of the XmlNode as a string. You can use this property to rename an XmlNode.
This property is read/write.
Description
This property returns the path of the XmlNode, from the root.
This property is read-only.
Description
This property returns the type of the XmlNode. You can use either a numeric value or a constant. The values are:
Numeric Value |
Constant Value |
Description |
---|---|---|
1 |
%ElementNode |
Element node |
2 |
%AttributeNode |
Attribute node |
3 |
%TextNode |
Text node |
4 |
%CDataSectionNode |
CData section node |
5 |
%EntityReferenceNode |
Entity reference node |
6 |
%EntityNode |
Entity node |
7 |
%ProcessingInstructionNode |
Processing instruction node |
8 |
%CommentNode |
Comment node |
9 |
%DocumentNode |
Document node |
10 |
%DocumentTypeNode |
Document type node |
11 |
%NotationNode |
Notation node |
12 |
%XmlDeclNode |
XML DECL node |
Description
This property returns the value of the XmlNode, as a string.
This property is read/write.
Description
This property returns a reference to the parent node for the XmlNode, as an XmlNode object.
Use the IsNull property to verify that the XmlNode that is returned is valid.
This property is read-only.
Related Links
Description
This property returns the prefix part of a namespace as a string. The prefix is the first part of the namespace entry. If you want access to the second part of a namespace, use the LocalName property.
This property is read-only.
Related Links
Description
This property returns a reference to the previous node in the XmlNode, as an XmlNode object.
Use the IsNull property to verify that the XmlNode that is returned is valid.
This property is read-only.