> Expat4D Home > Documentation > Command Reference

xml_SetCDATAHandler ( parserID; cdataHandler )


  • --> parserID : longint
  • --> cdataHandler : string[31]

Set the handler method for character data (CDATA) in the xml document. The CDATA is passed to the handler method as text. The CDATA handler method must be set up with the following input parameters.

`Method: handler_CDATA (parser; cdata)

C_LONGINT($1;$parser)
C_TEXT($2;$cdata)

$parser:=$1
$cdata:=$2

`do something with CDATA if necessary
`...
   
`Method: parseXML (text)

C_TEXT($1;$xmlText)
$xmlText:=$1

C_LONGINT($parser)
$parser:=xml_ParserCreate("")
xml_SetElementHandler($parser;"handler_startElement";"handler_endElement")
xml_SetCDATAHandler($parser;"handler_CDATA")

C_LONGINT($errorCode)
$errorCode:=xml_Parse($parser;$xmlText;1)
xml_ParserFree($parser)
   
  Expat4D Logo

Developer Documentation

Creating Parsers, Destroying Parsers, Parsing Text

Configuring Handler Methods

Position and Error Reporting Functions

Miscellaneous Functions

Output Buffer Functions

Error Codes


> Expat4D Home > Documentation > Command Reference

Last Modified: 27th April 2001 at 9:00 PM