Differences Between: [Versions 311 and 401] [Versions 311 and 402] [Versions 311 and 403]
Code for parsing xml files. Handles functionality for:
Copyright: | Kilian Singer |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 245 lines (9 kb) |
Included or required: | 1 time |
Referenced: | 1 time |
Includes or requires: | 0 files |
xml_format_exception:: (1 method):
__construct()
core_xml_parser:: (5 methods):
startelement()
endelement()
characterdata()
parse()
xmlize()
Class: xml_format_exception - X-Ref
__construct($errorstring, $line, $char, $link = '') X-Ref |
Constructor function param: string $errorstring Errorstring param: int $line Linenumber param: char $char Errorcharacter param: string $link Link |
Class: core_xml_parser - X-Ref
Class for parsing xml files.startelement($parser, $name, $attrs) X-Ref |
Is called when tags are opened. Note: Used by xml element handler as callback. author: Kilian Singer param: resource $parser The XML parser resource. param: string $name The XML source to parse. param: array $attrs Stores attributes of XML tag. |
endelement($parser, $name) X-Ref |
Is called when tags are closed. Note: Used by xml element handler as callback. author: Kilian Singer param: resource $parser The XML parser resource. param: string $name The XML source to parse. |
characterdata($parser, $data) X-Ref |
Is called for text between the start and the end of tags. Note: Used by xml element handler as callback. author: Kilian Singer param: resource $parser The XML parser resource. param: string $data The XML source to parse. |
parse($data, $whitespace = 1, $encoding = 'UTF-8', $reporterrors = false) X-Ref |
Parses XML string. Note: Interface is kept equal to previous version. author: Kilian Singer param: string $data the XML source to parse. param: int $whitespace If set to 1 allows the parser to skip "space" characters in xml document. Default is 1 param: string $encoding Specify an OUTPUT encoding. If not specified, it defaults to UTF-8. param: bool $reporterrors if set to true, then a {@link xml_format_exception} return: array representation of the parsed XML. |
xmlize($data, $whitespace = 1, $encoding = 'UTF-8', $reporterrors = false) X-Ref |
XML parsing function calles into class. Note: Used by xml element handler as callback. param: string $data the XML source to parse. param: int $whitespace If set to 1 allows the parser to skip "space" characters in xml document. Default is 1 param: string $encoding Specify an OUTPUT encoding. If not specified, it defaults to UTF-8. param: bool $reporterrors if set to true, then a {@link xml_format_exception} return: array representation of the parsed XML. |