[xml] Dumping documents with substituted entities
- From: Jørgen Frøjk Kjærsgaard {Metation} <jfk metation com>
- To: xml gnome org, xml-bindings gnome org
- Subject: [xml] Dumping documents with substituted entities
- Date: Thu, 16 May 2002 10:29:37 +0200
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>"text"</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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]