Home > PHP > Function > XML Parser > xml_parse()

xml_parse()

xml_parse - Start parsing an XML document

Syntax

int xml_parse (resource $parser, string $data, bool $is_final)

Arguments

  • parser - A reference to the XML parser to use.
  • data - Chunk of data to parse. A document may be parsed piece-wise by calling xml_parse() several times with new data, as long as the is_final parameter is set and TRUE when the last data is parsed.
  • is_final - If set and TRUE, data is the last piece of data sent in this parse.

Description

xml_parse() parses an XML document. The handlers for the configured events are called as many times as necessary.

Version

PHP 4, 5

Return value

Returns 1 on success or 0 on failure.