[Pythonmac-SIG] parsing system_profiler xml output

Just van Rossum just at letterror.com
Fri Nov 12 08:44:49 CET 2004


Bob Ippolito wrote:

> That's actually lower level than the DTD.  Python's XML parser doesn't  
> think the XML is well formed *at all*.  Looking at the XML, it seems  
> that Apple uses some low-ascii characters like this:
> 
> 'Nov 11 19:09:50 crack-wlan kernel: \x10ADB present:8c'
> 
> expat, the low level parser behind Python's default XML handling  
> capabilities, does not like this at all.  I believe this is probably a  
> bug in expat.

The XML spec suggests it's an Apple bug:
    http://www.w3.org/TR/REC-xml/#charsets 

"""Legal characters are tab, carriage return, line feed, and the legal
characters of Unicode and ISO/IEC 10646."""

Interesting article:
    http://www.awprofessional.com/articles/article.asp?p=169537&seqNum=2

Just


More information about the Pythonmac-SIG mailing list