Home > Language Reference > Classes > XmlParser

Tag Property

Tag name.

Syntax

Public Property Get Tag(ByVal iDepth As Integer) As String

ParameterDescription
iDepthZero-based index of the tag on the parser stack.

Remarks

The Tag property returns the name of a tag on the parser stack. Calling this property is only meaningful while parsing a document, that is while processing the StartElement, EndElement and CharData events. In any other circumstance, it raises a runtime error.

The iDepth parameter specifies the tag which is requested. The value 0 refers to the tag at the top of the parser stack, that is the tag being currently analysed; the value 1 refers to the tag one level deeper, that is the tag surrounding the current tag; and so on. Therefore the iDepth parameter must lie between zero and the current height of the XML tree minus one, otherwise a runtime error occurs.

You can retrieve attributes associated with a given tag using the Attributes property.

System requirements

SystemMinimal versionRemarks
Palm OSPalm OS 3.0N/A