PHP 7.0.6 Released

XML Parser

add a note add a note

User Contributed Notes 4 notes

up
0
2538321000 at qq dot com
3 hours ago
When I use the XML parser parsed 10 m file, the system will prompt me XML error parsing the SOAP payload on line 1: No memory.View the manual: This extension has no configuration directives defined in PHP. The ini. And not in the xml_parser_set_option about the memory Settings, how do I want to solve This problem?
up
1
marcgear at gmail dot com
5 years ago
While this SAX event based parser is better for memory management than the tree based parsers of SimpleXML and DOM, the pull-based parser XMLReader is much easier to use than the xml_parser_* functions, and still doesn't require loading the file into memory.
up
-19
nat
6 years ago
An event-based parser such XML Parser is preferable for large files, because tree-based parsers must fully load the file into memory in order to parse the XML. Event-based parsers do not need to load the entire file into memory to begin parsing.
up
-26
pavel dot lishin at gmail dot com
6 years ago
If you're wanting to actually work with XML data as it was intended, treating it as a tree, try http://us2.php.net/manual/en/book.simplexml.php .
To Top