[XML-SIG] [ pyxml-Bugs-1598441 ] Fails to print ampersand

SourceForge.net noreply at sourceforge.net
Fri Nov 17 17:16:29 CET 2006


Bugs item #1598441, was opened at 2006-11-17 17:16
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=106473&aid=1598441&group_id=6473

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Daniel Aarno (macbishop)
Assigned to: Nobody/Anonymous (nobody)
Summary: Fails to print ampersand

Initial Comment:
I can't figure out how to print a ampersand in a text node. This is probably not a bug but a feature but it has been giving me a headeach.

### BEGIN CODE ###
Running the following program:

from xml.dom.minidom import *
from xml.dom.ext import *

doc = Document()
n = doc.createElement("aroot")
tn = doc.createTextNode(" ")
n.appendChild(tn)
doc.appendChild(n)

PrettyPrint(doc)

### END CODE ###

I want the output to be
<?xml version='1.0' encoding='UTF-8'?>
<aroot>&nbsp;</aroot>

but the actual output is:

<?xml version='1.0' encoding='UTF-8'?>
<aroot>&amp;nbsp;</aroot>

i.e. the & has been replaced by &amp; which is not what I want.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=106473&aid=1598441&group_id=6473


More information about the XML-SIG mailing list