Below you will find pages that utilize the taxonomy term “XML”
Articles
read more
PHP: Create an Object-Oriented XML Parser using the Built-in xml_* Functions
With all the fancy XML parsers/serializers/deserializers around, you would almost forget there are built-in PHP functions for defining highly customized XML parsers. You can use the xml_*
functions to assemble an XML parser step by step.
Setting up an XML parser - the procedural way
First, you create a new parser resource using
$encoding = 'UTF-8';
$parser = xml_parser_create($encoding);
The first and only argument of this function is the target encoding of the parser.