Skip to Main Content
XML and PHP
book

XML and PHP

by Vikram Vaswani
June 2002
Intermediate to advanced content levelIntermediate to advanced
384 pages
7h 53m
English
Sams
Content preview from XML and PHP

Using Native Data Structures

You may sometimes come across a situation that requires you to convert raw XML markup into native data structures such as variables, arrays, or custom objects. For these situations, PHP offers a very specialized little function named xml_parse_into_struct().

The xml_parse_into_struct() function requires four arguments:

  • A reference to the XML parser

  • The raw XML data to be processed

  • Two arrays to hold the data in structured form

After xml_parse_into_struct() has processed the XML document, it populates the two arrays with detailed information on the structure of the XML document. One array holds a list of all the elements encountered by the parser in its journey through the XML document; the other contains information ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

PHP Development Tool Essentials

PHP Development Tool Essentials

Chad Russell
PHP Web Services

PHP Web Services

Lorna Jane Mitchell

Publisher Resources

ISBN: 0735712271Purchase book