[XML-SIG] need some help...
sa
sahrens@uv.ruhr-uni-bochum.de
Fri, 03 Nov 2000 16:32:12 +0100
--------------24C8E55EED37AA0C25B326EB
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Hi folks,
Iīve got some problems with the pyxml stuff. Even though I worked with
xml under perl and eiffel and I am familiar with all the general
concepts of xml / dom / sax etc I donīt have a clue how to do it under
python (I am no python newbee). If one tries to get the documentation
from the python.org site one can read the following lines:
"""
import sys
from xml.sax import saxexts
from xml.dom.sax_builder import SaxBuilder
# Create a SAX parser and a SaxBuilder instance
p = saxexts.make_parser()
dh = SaxBuilder()
p.setDocumentHandler(dh)
----------------- snip ----------------
from xml.dom import utils
reader = utils.FileReader('quotations.xml')
doc = reader.document
"""
Well that sounds so nice but why isnīt any of the mentioned modules in
the distro (no xml.dom.utils.FileReader nor xml.dom.sax_builder ...) and
how should I do it instead? Could anyone point me towards a
documentation or would anyone be so kind to send my some simple code
showing how to parse an xml-file and print out the dom-tree etc.
Oh well if you would help me understand the python way of handling xml I
would try to write down some simple docs if you do not have somebody so
far applying for that job ;-)
regards
Sebastian
--------------24C8E55EED37AA0C25B326EB
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Hi folks,
<br>I´ve got some problems with the pyxml stuff. Even though I worked
with xml under perl and eiffel and I am familiar with all the general concepts
of xml / dom / sax etc I don´t have a clue how to do it under python
(I am no python newbee). If one tries to get the documentation from the
python.org site one can read the following lines:
<br>
<blockquote>"""
<br> import sys
<br> from xml.sax import saxexts
<br> from xml.dom.sax_builder import SaxBuilder
<p> # Create a SAX parser and a SaxBuilder instance
<br> p = saxexts.make_parser()
<br> dh = SaxBuilder()
<br> p.setDocumentHandler(dh)
<p>----------------- snip ----------------
<p> from xml.dom import utils
<br> reader = utils.FileReader('quotations.xml')
<br> doc = reader.document
<br>
<p>"""</blockquote>
<p><br>Well that sounds so nice but why isn´t any of the mentioned
modules in the distro (no xml.dom.utils.FileReader nor xml.dom.sax_builder
...) and how should I do it instead? Could anyone point me towards a documentation
or would anyone be so kind to send my some simple code showing how to parse
an xml-file and print out the dom-tree etc.
<p>Oh well if you would help me understand the python way of handling xml
I would try to write down some simple docs if you do not have somebody
so far applying for that job ;-)
<br>
<p> regards
<p>
Sebastian</html>
--------------24C8E55EED37AA0C25B326EB--