Re: Corrected list of packages handling XML 1.1

Walter Dörwald <[email protected]>
Newsgroups gmane.comp.python.xml
Organization LivingLogic AG, Bayreuth/Germany
Message-ID <[email protected]>
Ken Beesley wrote:

> My apologies to Fredrik Lundh of Pythonware for the omission of 
> ElementType+sgmlop in my recent listing of Python-XML packages that 
> handle XML 1.1. The list (that I'm aware of) currently includes: 1. 
> pxdom by Andrew Clover (http://www.doxdesk.com/software/py/pxdom.html, 
> http://www.doxdesk.com/file/software/py/pxdom.py) 2. pyLTXML from the 
> Univ. of Edinburgh (http://www.ltg.ed.ac.uk/software/xml, 
> http://www.ltg.ed.ac.uk/software/gpl_xml.html, 
> http://www.ltg.ed.ac.uk/software/xml/xmldoc/xmldoc.html) 3. elementtree 
> library from Pythonware (http://effbot.org/zone/element.htm, 
> http://effbot.org/zone/element-index.htm) If I've forgotten anyone, 
> please help me complete the list.
 > [...]

XIST (http://www.livinglogic.de/Python/xist) handles XML 1.1 charrefs 
when a parser is used that does it. (XIST uses sgmlop by default, so it 
works by default). When serializing XML those charrefs are always 
supported. See the following snippet:

 >>> from ll.xist import parsers, presenters
 >>> from ll.xist.ns import html
 >>> e = parsers.parseString("<body>this is a backspace: &#x0008;</body>")
 >>> print e.asrepr(presenters.CodePresenter())
ll.xist.xsc.Frag(
    ll.xist.ns.html.body(
       'this is a backspace: \x08'
    )
)
 >>> print e.asBytes()
<body>this is a backspace: &#8;</body>

Bye,
    Walter Dörwald
_______________________________________________
XML-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/xml-sig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.