[PHP DOM] Proposal of boolean property DOMDocument::keepCharacterEntities
| From: | Freyjkell | Date: | Thu, 18 Oct 2007 16:30:46 +0000 |
| Subject: | [PHP DOM] Proposal of boolean property DOMDocument::keepCharacterEntities | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-32858@lists.php.net to get a copy of this message | ||
(bool) DOMDocument::keepUnknownCharacterEntities = false;
If set to true (before calling DOMDocument::load() or DOMDocument::loadXML()), when parser will occur an unknown entity, it won't crash, but let it alone. In DOMNode::textContent, DOMNode::getAttribute() and similar, they will be omitted. During importing it to another document, they will be moved without any changes.
It could be useful for editing XHTML documents. DOMDocument::resolveExternals is very slow. Even if DTD is on disk, it includes many crappy code (i.e. references to XML Schema).
--
Freyjkell
JID: nikn@jabber.org