Re: [xml] Reordering of meta tags -- Bug?

On Thu, Jul 17, 2003 at 03:33:58PM +0200, Georg Rehm wrote:
If I put this XHTML code into a LibXML-object and call toString(), the
title and the meta tags are swapped:

  No they are not swapped, the encoding meta tag is rewritten when serializing.

things like


work, but 

    $elem->setAttributeNS("myNS", "foo", "bar") 

does not have any effect at all. Even removing the node has no effect, 
because as soon as I call toString(), the node in question magically 
reappears. Is there any way to bypass this behaviour or to actually 
delete this node?

  The node is (re-)created because your are serializing XHTML-1.0 and 
in accordance to the XHTML-1.0 spec rules for serialization.
If you don't want this (and other serialization specific serialization
rules) to occur remove the DOCTYPE indicating it's an XHTML-1.0 document.
That's the only way.


Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]