> Expat4D Home > Documentation > Command Reference

xml_SetPIHandler ( parserID; handler )


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

PI in this case is not the mathematical constant, but an abbreviation for processing instruction. This command sents the handler method for processing instructions. The handler method is passed the parserID, processing instruction target, and the data.

`Method: handler_ProcessingInstruction (parser; target; data)

C_LONGINT($1;$parser)
C_TEXT($2;$target)
C_TEXT($3;$data)

$parser:=$1
$target:=$2
$data:=$3

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

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

C_LONGINT($parser)
$parser:=xml_ParserCreate("")
xml_SetPIHandler($parser;"handler_ProcessingInstruction")

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