[Zope] XMLDocument question
Jim Harrison
jhrsn@pop.pitt.edu
Wed, 01 Dec 1999 16:51:15 -0500
I'm beginning to work with XMLDocument and I have a question. I'm a pretty
green Zope newbie, so please excuse me if this is naive.
I'm able to import XML documents to form a tree of elements and access those
elements based on their 'e#' id notation; attributes also get parsed
correctly into properties. I've modified a display method from the Examples
files to return the text content of any element in response to a url
request, so things seem to be working correctly.
What's the strategy behind the id notation approach to access? It's pretty
unwieldy given that you must view the document's display in the management
interface to see what ids are there, and ids change when the document is
edited. Is there a way to use the tag names in a url to target particular
parts of the document? The alternate access method based on the numerical
sequence of elements through the hierarchy is useful for iteration and
documents of rigid structure, but less useful than tag names with more
flexible documents when a particular element or subtree is desired.
Since the slideshow example uses tag names along with objectValues to target
particular document content for display, the names are clearly there
(somewhere) and usable ... maybe I'm just thinking about this the wrong way.
If someone could post some additional example code dealing with tag name
manipulation, it would probably be really helpful to me.
Jim
________________________________________________________________________
James H. Harrison, Jr., MD, PhD
University of Pittsburgh Health System
C920 PUH, 200 Lothrop Street
Pittsburgh, PA 15213
jhrsn@pop.pitt.edu | voice: 412-647-5529 | fax: 412-647-9588
"If you want sense, you'll have to make it yourself!!"-Norton Juster
________________________________________________________________________