> Expat4D Home > Documentation > Command Reference

xml_SetDefaultHandler ( parserID; handler )


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

This handler is called for any part of the XML which is not handled by other handlers. So, if you set up handlers for elements and the default handler, the default handler will receive as a seperate blocks of text, each other part of the document, e.g. CDATA, Processing instructions, etc. The default handler method is pass just the parserID and the text being handled.

`Method: handler_Default (parser; data)

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

$parser:=$1
$data:=$2

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

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

C_LONGINT($parser)
$parser:=xml_ParserCreate("")
xml_SetDefaulHandler($parser;"handler_Default")

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