note 113676 added to domdocument.loadxml
| From: | GustavoL.Fabro | Date: | Thu, 14 Nov 2013 16:41:47 +0000 |
| Subject: | note 113676 added to domdocument.loadxml | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-197521@lists.php.net to get a copy of this message | ||
Always remember that with the default parameters this function doesn't handle well large files,
i.e. if a text node is longer than 10Mb it can raise an exception stating:
DOMDocument::loadXML(): internal error Extra content at the end of the document in Entity
even though the XML is fine.
The cause is a definition in parserInternals.h of lixml:
#define XML_MAX_TEXT_LENGTH 10000000
To allow the function to process larger files, pass the LIBXML_PARSEHUGE as an option and it will
work just fine:
$domDocument->loadXML($xml, LIBXML_PARSEHUGE);
----
Server IP: 64.71.164.2
Probable Submitter: 186.215.179.190
----
Manual Page -- http://php.net/manual/en/domdocument.loadxml.php
Edit -- https://master.php.net/note/edit/113676
Del: integrated -- https://master.php.net/note/delete/113676/integrated
Del: useless -- https://master.php.net/note/delete/113676/useless
Del: bad code -- https://master.php.net/note/delete/113676/bad+code
Del: spam -- https://master.php.net/note/delete/113676/spam
Del: non-english -- https://master.php.net/note/delete/113676/non-english
Del: in docs -- https://master.php.net/note/delete/113676/in+docs
Del: other reasons-- https://master.php.net/note/delete/113676
Reject -- https://master.php.net/note/reject/113676
Search -- https://master.php.net/manage/user-notes.php