Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

xml_parse(3) [php man page]

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)

Check Out this Related Man Page

XML_SET_CHARACTER_DATA_HANDLER(3)					 1					 XML_SET_CHARACTER_DATA_HANDLER(3)

xml_set_character_data_handler - Set up character data handler

SYNOPSIS
bool xml_set_character_data_handler (resource $parser, callable $handler) DESCRIPTION
Sets the character data handler function for the XML parser $parser. PARAMETERS
o $parser - A reference to the XML parser to set up character data 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 two parameters: handler (resource $parser, string $data) o $parser - The first parameter, parser, is a reference to the XML parser calling the handler. o $data - The second parameter, $data, contains the character data as a string. Character data handler is called for every piece of a text in the XML document. It can be called multiple times inside each frag- ment (e.g. for non-ASCII strings). 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_CHARACTER_DATA_HANDLER(3)
Man Page

5 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

problem parsing output file

Hi Gurus, I am using the following code to parse the output of a file. This code basically parses the file and adds | at the end of each field. But I am getting it wrong in some cases. I have explained it below #----- parse output file, get each field position, ----- #----- and construct... (13 Replies)
Discussion started by: ragha81
13 Replies

2. Shell Programming and Scripting

awk sed parsing

hi , i would like to parse some file with the fallowing data : data data data "unwanted data" data data "unwanted data" data data data data #unwanted data. what i want it to have any coments between "" and after # to be erased using awk or/and sed. has anyone an idea? thanks. (3 Replies)
Discussion started by: Darsh
3 Replies

3. Shell Programming and Scripting

AWK match and print

I have thousands of tables compiled in a single txt document that I'm parsing with AWK. Scattered throughout the document in random sections I would like to parse out the sections that look like this: 1 Seq. Descrição do bem Tipo do bem Valor do bem (R$) 2 1 LOCALIZADO ANA RUA PESSEGO N 96... (3 Replies)
Discussion started by: daveyabe
3 Replies

4. UNIX for Dummies Questions & Answers

Checking Data in File

Using If_ELSE, how do check a particular piece of data in a file. My data file has three columns and say I want to check the data in the 2nd column. I want to do a comparsion against a another piece of data using IF_ELSE. How do I get that data in file to check? (1 Reply)
Discussion started by: razer212
1 Replies

5. UNIX for Advanced & Expert Users

"exec" with "read"

Hi guys... I have been doing binary experiments yet again and came across a superb piece of code... I extracted a very small piece and re-wrote to suit my needs:- #!/bin/bash --posix # bash-hexdump # Open the file $1 to be read with an fd 3. exec 3<"$1" saveIFS="$IFS" IFS=""... (9 Replies)
Discussion started by: wisecracker
9 Replies