Re: [xml] DOM modifying XML without permission
- From: Rob Richards <rrichards ctindustries net>
- To: Aidan Lister <aidanis gmail com>
- Cc: xml gnome org
- Subject: Re: [xml] DOM modifying XML without permission
- Date: Mon, 18 Jul 2005 11:02:54 -0400
Question should have gone to the php general list.
To answer the question though, resolveExternals property is also adding
the default attributes into the tree. This property is not part of specs
and behavior as is for those coming from domxml in PHP 4. In PHP 5.1
(libxml2 2.6.0+ required), you can pass the libxml parser options (2nd
optional argument) when calling the load methods to get finer grain
control over the loading of the document.
Rob
Aidan Lister wrote:
Hello list,
I'm not sure if this is the correct place to ask this question, please
feel free to redirect me if this is the case.
I've noticed that when using (libxml2) DomDocument::load(), the XML
loaded (simple docbook xml with DTD specified) does not match the XML
entered.
A specific example of this is the addition of 'float="0"' to
<figure>'s. <figure id="foobar"> is loaded, but <figure id="foobar"
frame="0"> is output with DomDocument::saveXml().
A quick look at the docbook spec,
http://www.docbook.org/tdg/en/html/figure.html, shows that frame="0"
is a default value. That's nice, but why does Dom feel the need to add
it to my XML? Can I disable it?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]