[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.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]