[XML-SIG] FromXml question
paul@boddie.net
paul@boddie.net
29 Oct 2001 10:48:54 -0000
markus jais <info@mjais.de> wrote:
>
>I just downloaded the new PyXML tutorial about DOM from IBM's developerworks
>and read, that
>FromXmlStream
>FromXml
>FromXmlFile
>FromXmlUrl
>
>are the main functions for parsing.
>but when I look at the source code of Sax2.py
>these functions are marked
>"Deprecated "
Just the other day, I wrote a message to this list [1] about the deprecated
FromXmlStream and the seemingly supported fromStream method in the Reader class
located in the Sax2.py module. I think that you have to replace...
from xml.dom.ext.reader.Sax2 import FromXmlStream # or whatever
doc = FromXmlStream(someStream)
...with...
from xml.dom.ext.reader.Sax2 import Reader
doc = Reader().fromStream(someStream)
At least, that's how it seems to me, anyway.
Paul
[1] http://mail.python.org/pipermail/xml-sig/2001-October/006232.html
--
Get your firstname@lastname email for FREE at http://Nameplanet.com/?su