> Expat4D Home > Documentation > Command Reference

xml_SetNSDeclHandler ( parserID; startHandler; endHandler )


  • --> parserID : longint
  • --> startHandler : string[31]
  • --> endHandler : string[31]

Sets the handler methods for namespace declarations. The parserID, namespace prefix and URI are passed to the start handler method and only the parserID and prefix to the end handler. The start handler for the namespace declaration is called before the handler for the element in which the namespace is declared and the end handler after the element end handler where the namespace loses scope.

Note: This option only works when namespace processing has been enabled by creating the parser using xml_ParserCreateNS.

`Method: handler_StartNSDeclaration (parser; prefix; uri)

C_LONGINT($1;$parser)
C_TEXT($2;$prefix)
C_TEXT($3;$uri)

$parser:=$1
$prefix:=$2
$uri:=$3

`...
   

`Method: handler_EndNSDeclaration (parser; prefix)

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

$parser:=$1
$prefix:=$2

`...
   

`Method: parseXML (text)

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

C_LONGINT($parser)
$parser:=xml_ParserCreateNS("")
xml_SetNSDeclHandler($parser;"handler_StartNSDeclaration";"handler_EndNSDeclaration")

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