Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

xml_set_start_namespace_decl_handler(3) [php man page]

XML_SET_START_NAMESPACE_DECL_HANDLER(3) 				 1				   XML_SET_START_NAMESPACE_DECL_HANDLER(3)

xml_set_start_namespace_decl_handler - Set up start namespace declaration handler

SYNOPSIS
bool xml_set_start_namespace_decl_handler (resource $parser, callable $handler) DESCRIPTION
Set a handler to be called when a namespace is declared. Namespace declarations occur inside start tags. But the namespace declaration start handler is called before the start tag handler for each namespace declared in that start tag. PARAMETERS
o $parser - A reference to the XML parser. o $handler -$handler is a string containing the name of a function that must exist when xml_parse(3) is called for $parser. The function named by $handler must accept three parameters, and should return an integer value. If the value returned from the handler is FALSE (which it will be if no value is returned), the XML parser will stop parsing and xml_get_error_code(3) will return XML_ERROR_EXTERNAL_ENTITY_HANDLING. handler (resource $parser, string $prefix, string $uri) o $parser - The first parameter, parser, is a reference to the XML parser calling the handler. o $prefix - The prefix is a string used to reference the namespace within an XML object. o $uri - Uniform Resource Identifier (URI) of namespace. If a handler function is set to an empty string, or FALSE, the handler in question is disabled. Note Instead of a function name, an array containing an object reference and a method name can also be supplied. RETURN VALUES
Returns TRUE on success or FALSE on failure. SEE ALSO
xml_set_end_namespace_decl_handler(3). PHP Documentation Group XML_SET_START_NAMESPACE_DECL_HANDLER(3)

Check Out this Related Man Page

XML_SET_UNPARSED_ENTITY_DECL_HANDLER(3) 				 1				   XML_SET_UNPARSED_ENTITY_DECL_HANDLER(3)

xml_set_unparsed_entity_decl_handler - Set up unparsed entity declaration handler

SYNOPSIS
bool xml_set_unparsed_entity_decl_handler (resource $parser, callable $handler) DESCRIPTION
Sets the unparsed entity declaration handler function for the XML parser $parser. The $handler will be called if the XML parser encounters an external entity declaration with an NDATA declaration, like the following: <!ENTITY <parameter>name</parameter> {<parameter>publicId</parameter> | <parameter>systemId</parameter>} NDATA <parameter>notationName</parameter> See section 4.2.2 of the XML 1.0 spec for the definition of notation declared external entities. PARAMETERS
o $parser - A reference to the XML parser to set up unparsed entity declaration handler function. o $handler -$handler is a string containing the name of a function that must exist when xml_parse(3) is called for $parser. The function named by $handler must accept six parameters: handler (resource $parser, string $entity_name, string $base, string $system_id, string $public_id, string $notation_name) o $parser - The first parameter, parser, is a reference to the XML parser calling the handler. o $entity_name - The name of the entity that is about to be defined. o $base - This is the base for resolving the system identifier ($systemId) of the external entity.Currently this parameter will always be set to an empty string. o $system_id - System identifier for the external entity. o $public_id - Public identifier for the external entity. o $notation_name - Name of the notation of this entity (see xml_set_notation_decl_handler(3)). If a handler function is set to an empty string, or FALSE, the handler in question is disabled. Note Instead of a function name, an array containing an object reference and a method name can also be supplied. RETURN VALUES
Returns TRUE on success or FALSE on failure. PHP Documentation Group XML_SET_UNPARSED_ENTITY_DECL_HANDLER(3)
Man Page