|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-04-03 18:39 UTC] tony2001@php.net
[2007-04-11 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 23:00:01 2025 UTC |
Description: ------------ DOMDocumentType entities fails to return a valid tree Reproduce code: --------------- $xml_str=XML_VERSIOn."<!DOCTYPE jsx SYSTEM 'lang/$lang.dtd'><jsx>s &lang_key.fr;</jsx>"; $doc = new DOMDocument("1.0","utf-8"); $doc->resolveExternals=true; $doc->substituteEntities=true; $doc->loadXML($xml_str); $dtd=$doc->firstChild; echo $dtd->publicId;//('')=>ok echo $dtd->systemId;//('lang/fr.dtd')=>ok echo $dtd->name;//('jsx')=>ok echo $dtd->internalSubset;//('<!...')=>ok foreach($dtd->entities as $elem) echo "even one"; //nope :( echo $doc->saveXML();die;//<jsx>s Francais</jsx>=>ok Expected result: ---------------- .*? even one .*?