RE: [xml] Stupid Newbie Question about Parsing
- From: "Ron Ohmer" <rohmer aisconsulting net>
- To: "'Dan White'" <ygor comcast net>, <xml gnome org>
- Subject: RE: [xml] Stupid Newbie Question about Parsing
- Date: Wed, 17 Mar 2004 09:10:14 -0500
You can go either way...
Honestly, I originally went #1, and "walked" the tree. This was tedious,
buggy, and slow..
That being said, if you know what your tree is going to look like ahead of
time, use xpath. You can go straight to the node in question, much faster,
easier, and no bugs..
-----Original Message-----
From: xml-admin gnome org [mailto:xml-admin gnome org] On Behalf Of Dan
White
Sent: Wednesday, March 17, 2004 9:08 AM
To: xml gnome org
Subject: [xml] Stupid Newbie Question about Parsing
I am possibly approaching XML parsing from a wrong direction, so I thought
I'd ask:
Should I expect to be able to blindly parse an XML tree (created with
xmlParseFile ( "file.xml" ) or similar), finding attributes and content
and such dynamically --
--or--
Should I be working from a known DTD or XML structure such that I know
which tags have what children and how many ?
If the first one, a few pointers to detailed tree traversal would be
appreciated. All examples I have found so far seem to concentrate on only
one aspect -- tag names or element content or whatever, but not all
together.
Thanks in advance.
_______________________________________________
xml mailing list, project page http://xmlsoft.org/
xml gnome org
http://mail.gnome.org/mailman/listinfo/xml
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]