Class XPXMLTAG

This is a sub-object of the XPXMLDOC object. It is used to hold information about a single tag element and it's children and attributes.

Known SubClasses

XPXMLDOC

Properties

PROPERTY Name$

The tag name

PROPERTY Text$

Optional text value associated with this tag

PROPERTY DecodedText$

A decoded version of the 'Text$' property

PROPERTY Attributes

A reference to a [ProvideX Library Class:*obj/group] for the atrtibutes of this tag

PROPERTY AttributeCount

The number of attributes for this tag

PROPERTY Elements

A reference to a [ProvideX Library Class:*obj/group] for the child elements of this tag

PROPERTY ElementCount

The number of child elements

PROPERTY CurrentElement

PROPERTY CurrentElementName$

PROPERTY LineSep$

The line separator character to be used when building the 'XMLString$' property. (Default is $0D0A$ - Carriage return / line feed)

PROPERTY XMLString$

Use this property to pull the XML coding of this element and its children as a single string.

Methods

FUNCTION CreateAttribute(_Name$)

Create an attribute

ParameterDescription
_Name$ The name of the attribute to be created
Returns the a reference to the [ProvideX Library Class:*obj/group] object that is created or ZERO if creation fails
FUNCTION CreateAttribute(_Name$, _Text$)

Create an attribute

ParameterDescription
_Name$ The name of the attribute to be created
_Text$ The text value to be set for the attribute
Returns the a reference to the [ProvideX Library Class:*obj/group] object that is created or ZERO if creation fails
FUNCTION CreateElement(_Name$)

Create a child element

ParameterDescription
_Name$ The name of the element to be created
Returns the a reference to the [ProvideX Library Class:*obj/group] object that is created or ZERO if creation fails
FUNCTION CreateElement(_Name$, _Text$)

Create a child element

ParameterDescription
_Name$ The name of the element to be created
_Text$ The text value to be set for the element
Returns the a reference to the [ProvideX Library Class:*obj/group] object that is created or ZERO if creation fails
FUNCTION FindAttribute(_Name$)

Search for the first occurance of a specific attribute by name

ParameterDescription
_Name$ The name of the attribute to find
Returns the a reference to the [ProvideX Library Class:*obj/group] object for the attribute or ZERO if not found
FUNCTION FindAttributeText$(_Name$)

Search for the first occurance of a specific attribute by name

ParameterDescription
_Name$ The name of the attribute to find
Returns the Text$ value for the attribute found
FUNCTION FindElement(_Name$)

Search for the first occurance of a specific element by name

ParameterDescription
_Name$ The name of the element to find
Returns the a reference to the [ProvideX Library Class:*obj/group] object for the element or ZERO if not found
FUNCTION FindElementText$(_Name$)

Search for the first occurance of a specific element by name

ParameterDescription
_Name$ The name of the element to find
Returns the Text$ value for the element found
FUNCTION FindNextElement()

FUNCTION FindNextElement(_Name$)

FUNCTION FindNextElementName$()

FUNCTION FindNextElementText$()

FUNCTION FindNextElementText$(_Name$)

FUNCTION Parse$(_XMLText$)

Breaks the XMLText$ down into its elements and attributes.

ParameterDescription
XMLText$ The string containing the XML document
FUNCTION SetName(_Name$)

Set the name of this tag

ParameterDescription
_Name$ The name to be assigned to this tag
FUNCTION SetText(_Text$)

Set the taxt value for this tag

ParameterDescription
_Text$ The text value to be assigned to this tag