Dumping documents with substituted entities

Jørgen Frøjk Kjærsgaard {Metation} <[email protected]> Thu, 16 May 2002 10:29:37 +0200
Newsgroups gmane.comp.gnome.lib.xml.bindings
Organization Metation
Message-ID <[email protected]>
If I parse a simple XML document in Python and dump it using serializeNode(), 
many special characters are output as entities. Example:

  import libxml2mod

  dom = libxml2mod.xmlParseDoc("""<test>"text"</test>""")
  print "Raw document:\n%s" % libxml2mod.serializeNode(dom, 'iso-8859-1', 1)

This program outputs:

Raw document:
<?xml version="1.0" encoding="iso-8859-1"?>
<test>&quot;text&quot;</test>

How do I make it output the document as:

<test>"text"</test>

What I need to do is to generate some JavaScript code via XML/XSLT in which 
quotes are essential. Alså I may need to generate some plain-text XSLT output 
in which I don't want entities.

regards, Jørgen