Home > Language Reference > Classes > XmlParser

CharData Event

Raised when the parser encounters raw data.

Syntax

Public Event CharData(ByVal sText As String)

ParameterDescription
sTextRaw data.

Remarks

The CharData event is raised when the parser encounters raw data in the document. You can call the Tag, Attributes and UserData properties from this event handler to determine the context, such as the tag that encloses the data.

The sText parameter contain the data encountered. The string is trimed according to the current space mode, which is defined by the value of the eSpaceMode parameter in the StartElement event. Not all characters can be represented within the Palm OS code page. Characters that cannot be displayed are replaced by the character defined using the SubstChar property.

Usually, this event is raised once for each section of data in the XML document. However, it may be raised several times if the document has CDATA sections. For example, if the document contains "abc<![CDATA[def]]>ghi", the CharData event will be raised three times, once for "abc", once for "def" and a last time for "ghi".

System requirements

SystemMinimal versionRemarks
Palm OSPalm OS 3.0N/A