Re: [PHP-XML-DEV] php5: ext/dom: unused namespace-definitions
[email protected] ("Rob Richards") Wed, 7 Apr 2004 09:31:42 -0400
| Newsgroups | php.xml.dev |
|---|---|
| Message-ID | <[email protected]> |
From: "Vivian Steller" <[email protected]> > if i have a document like: > > <?xml version="1.0"?> > <prefix:element xmlns:prefix="namespaceUri" > xmlns:unusedPrefix="unusedNamespaceURI"> > <!-- nothing --> > </prefix:element> > > you can see that there is no element making use of the namespace > "unusedNamespaceURI". > passing this data to any doc->loadXML($data) method, the loadXML function > will remove the unused "xmlns:unusedPrefix" definition from the node. this > causes problems in my programm... is there a possibility to prevent the > function from removing unused namespaces?! > > I think this example shows a real case scenario - the possiblity to prevent > the load functions from "optimizing" the dom-tree like this would be > helpfull. Have no idea what you mean that it is removing the unused namespace. doc->loadXML($data) print doc->saveXML() shows that the unused namespace still exists within the document. The load does nothing special to the data other than to pass it on to libxml Rob