[XML-SIG] Newbie confused by output ...

Martin v. Loewis martin@mira.cs.tu-berlin.de
Tue, 23 Jan 2001 10:18:49 +0100


> I am new to Python and am trying to get a hang of the XML libraries
> available.  I am having trouble finding tutorials and documentation.

Please have a look at

http://pyxml.sourceforge.net/topics/

specifically

http://www.python.org/doc/howto/xml/

For reference documentation, use

http://python.sourceforge.net/devel-docs/lib/markup.html

> Character data: u'\012'
> End element: parent
> 1
> 
> So what are all of those u's doing in there, and why is there a 1 printed?
> This was unexpected.

The u indicates that this is a unicode object, not a bytestring
object.  It appears that the feature is not documented in the Python
Reference Manual, see

http://www.python.org/2.0/new-python.html#SECTION000500000000000000000

The 1 means that the Parse function returned with a value of 1, see

http://www.python.org/doc/current/tut/node4.html

Regards,
Martin