Jacob Hookom wrote: > For any OT post, you must start with "I'm developing a struts > application and I was wondering...." > > I have to represent a File-like tree structure that could have thousands > of items, granted they won't all be displayed on the screen at once, but > users will be selecting "nodes" in the tree structure and browsing. My > idea is to cache the tree structure as an XML document in memory and run > XPath queries on it and comparing time stamps against the DB. > > I haven't heard of many people using XPath with their applications, and > I'm just wondering if I'm missing something? > > Jacob Hookom > Comprehensive Computer Science > University of Wisconsin, Eau Claire > > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.380 / Virus Database: 213 - Release Date: 7/24/2002 > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > >
If you do not already know about it you might have a look to the recursive tree walk using the Nested tag. You will especially like the part two whith the following example: (...)Easiest set of tree data available is to reflect an actual directory structure. Not as hard as it seems, actually we'll be using recursion for this also. (...) (requires a build more recent than the 1.1-b1 release). Talking about XML I have used it to create a simple HTML form based XML editing tool. It basicly works as followed: 1. A JDOM Element caches the XML tree. 2. Conversion from JDOM Element to a simple custom tree class with GUI specific properties added to the XML data. This tree class is exposed to Struts as an ActionForm property. 3. The Struts controller does the magic of recursively populating the tree properties (like flaging a node you want to expand ...) 4. Does the reverse operations of 1. and 2. to save any XML data modification if required. Of course not all of the above is relevant to you if you only need to read and not write to your XML tree structure. References: JDOM: http://www.jdom.org Nested Recursive Tree Example: http://www.keyboardmonkey.com/pilotlight/index.jsp Patrick -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

