[XML-SIG] Re: tabs inside attribute values removed

Jeremy Kloth jeremy.kloth@fourthought.com
Fri, 09 Mar 2001 10:16:00 -0700


> i am having to pre-process all text, substituting
> 	 for "\t" as a work-around for this problem.
> 
> if this is not performed, then all tabs inside
> attribute's values, e.g.
> <node attr="value\tsep\tby\ttabs"/>, are turned into
> spaces.

Using PyXML 0.6.4, I didn't see this behavior.

from xml.dom.ext.reader import Sax2
doc = Sax2.FromXml('<element attr="a&#x09;tab"/>')
attr = doc.documentElement.attributes.item(0)
print repr(attr.value)
'a\011tab'


-- 
Jeremy Kloth                             Consultant
jeremy.kloth@fourthought.com             (303)583-9900 x 105
Fourthought, Inc.                        http://www.fourthought.com
Software-engineering, knowledge-management, XML, CORBA, Linux, Python