XML_PARSE(3) 1 XML_PARSE(3)
xml_parse - Start parsing an XML document
SYNOPSIS
int xml_parse (resource $parser, string $data, [bool $is_final = false])
DESCRIPTION
xml_parse(3) parses an XML document. The handlers for the configured events are called as many times as necessary.
PARAMETERS
o $parser
- A reference to the XML parser to use.
o $data
- Chunk of data to parse. A document may be parsed piece-wise by calling xml_parse(3) several times with new data, as long as the
$is_final parameter is set and TRUE when the last data is parsed.
o $is_final
- If set and TRUE, $data is the last piece of data sent in this parse.
RETURN VALUES
Returns 1 on success or 0 on failure.
For unsuccessful parses, error information can be retrieved with xml_get_error_code(3), xml_error_string(3), xml_get_current_line_num-
ber(3), xml_get_current_column_number(3) and xml_get_current_byte_index(3).
Note
Entity errors are reported at the end of the data thus only if $is_final is set and TRUE.
PHP Documentation Group XML_PARSE(3)