DOMDocument::load(): Namespace default prefix was not found in Entity
问题 I am parsing some XML with PHP DOMDocument. This is my code: $doc = new DOMDocument; $doc->resolveExternals = true; $doc->substituteEntities = true; $doc->load('../poems_xml/'.$pid.'.xml'); $xsl = new DOMDocument; $xsl->load('../xslt/title.xsl'); $proc = new XSLTProcessor; $proc->importStylesheet($xsl); $ptitle = $proc->transformToXML($doc); I have an entity file declared at the beginning of my .xml: <?xml version="1.0" encoding="utf-8"?> <?oxygen RNGSchema="../dtd/dps.rng" type="xml"?> <?xml