You need to do some reading.
There are several approaches. The best approach depends on what you
need. xml.dom and xml.minidom read the entire XML file into memory and
returns the entire thing as a tree-based object, against which you can
run queries. xml.sax calls callback routines as it is parsing. If you
just need to extract a couple of pieces of information, that's more
efficient than reading and parsing the entire file first.
In your case, since you don't want to "manipulate" the tree, you just
want to pull out the data and plop it into a UI, I would think that
xml.sax would be the easiest way. There are lots of xml.sax examples on
the web. However, you should probably look through examples of the
other methods as well, to see if they happen to make more sense to you.
···
On Fri, 27 Jan 2006 12:46:09 +0100, Josiah Carlson <jcarlson@uci.edu> wrote:
Now i attach to you a example XML file to parse and the demo of my
objective.
The iptRequest.xml is the file to parse in one mode. I can't parse it.
The demo.py is my ideal result, manually built, that should be built by
parsing the XML.
How can i do to do it?
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
I thought that represent XML with XSLT in a XHTML file is the best way but how can i read the XHTML file with wxPython view?
···
2006/1/27, Tim Roberts < timr@probo.com>:
On Fri, 27 Jan 2006 12:46:09 +0100, Josiah Carlson < > jcarlson@uci.edu> wrote:
Now i attach to you a example XML file to parse and the demo of my
objective.
The iptRequest.xml is the file to parse in one mode. I can’t parse it.
The demo.py
is my ideal result, manually built, that should be built by
parsing the XML.
How can i do to do it?
You need to do some reading.
There are several approaches. The best approach depends on what you
need. xml.dom and xml.minidom read the entire XML file into memory and
returns the entire thing as a tree-based object, against which you can
run queries. xml.sax calls callback routines as it is parsing. If you
just need to extract a couple of pieces of information, that’s more
efficient than reading and parsing the entire file first.
In your case, since you don’t want to “manipulate” the tree, you just
want to pull out the data and plop it into a UI, I would think that
xml.sax would be the easiest way. There are lots of xml.sax examples on
the web. However, you should probably look through examples of the
other methods as well, to see if they happen to make more sense to you.
–
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
–
Sbaush