Python & XML
Adonis
deltapigz at telocity.com
Wed May 1 20:15:59 EDT 2002
as in a prior post i was recommened to purchase the book Python & XML by:
Christopher A. Jones & Fred L. Drake, Jr., which by the way is very
informative and thank you for the person who recommended it to me, but it
just happens that the majority if not all of the examples donot work, and i
have copied it verbatim, and no luck, of course i tweaked some exmaples to
work, but this one is beyond me and i have notbeen able to fix this:
from xml.dom.ext.reader.Sax2 import FromXmlStream
import sys
doc = FromXmlStream(sys.stdin)
for sku in doc.getElementsByTagName("sku"):
sku.normalize()
print "Sku: %s"%sku.firstChild.data
keeps telling me im out of space?
the example tells me to call it as "po.py < po.xml" but errors that. very
frustrating when your trying to learn XML processing in python and the
examples do not work! almot makes me feel my $30USD was not worth it. *sigh*
any help would greatly be appreciated.
Adonis
More information about the Python-list
mailing list