|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XML and LDAP: Common APIs?
mark hu wrote: > > Yes, I agree - and the stuff I am working on today is bring a collection of > XML objects ( in which every object has the same XML structure ), and the > number of objects could be changed very often, and futher the relation-ship > between these objects are parent and child, and one root level parent could > any number child and again these child could have multi-level sub child , > and so on ..... all these objects are linked together baed on 2 of the XML > tags ( e.g. nodeIDTag and parentIDTag ) - if it's NULL value means root > level parent, if it's not NULL follows this rule: all the parentIDTag in a > child note would has the value of its nearest parentIDTag value, so all the > objects would eventually construct a OBJECT TREE, and on the browser side - > I'll construct the whole TREE as a TREE VIEW list .... is there any good > idea to do this ????? right now, I am counting the max level of the TREE > level first ( both vertical and horizontal ... ), then go through a loop > based on these 2 params to creat vertical based objects collection ( which > has its nearest parent on the left ), then I have a JavaScript code to > generate client side TREE VIEW which takes these collections to populate all > the nodes value ..... thanks. Well.. if you've got all these objects which you can represent as XML, why not store them as a DOM Document? If you're using Java, JDOM (http://www.jdom.org) would be easiest. Otherwise, if you want simple object->XML mapping, there's various APIs to do that: http://www.jxml.com/quick/index.html http://castor.exolab.org --Jeff > > FYI: > > <ROOTCOLLECTION> > <ROOT1> > <nodeIDTag>1</nodeIDTag> > <parentIDTag></parentIDTag> > </ROOT1> > <CHILD1.1> > <nodeIDTag>1.1</nodeIDTag> > <parentIDTag>1</parentIDTag> > </CHILD1.1> > <CHILD1.1.1> > <nodeIDTag>1.1.1</nodeIDTag> > <parentIDTag>1.1</parentIDTag> > </CHILD1.1.1> > <CHILD1.1.1.1> > <nodeIDTag>1.1.1.1</nodeIDTag> > <parentIDTag>1.1.1</parentIDTag> > </CHILD1.1.1.1> > <CHILD1.2> > <nodeIDTag>1.2</nodeIDTag> > <parentIDTag>1</parentIDTag> > </CHILD1.2> > <CHILD1.3> > <nodeIDTag>1.3</nodeIDTag> > <parentIDTag>1</parentIDTag> > </CHILD1.3> > <ROOT2> > <nodeIDTag>2</nodeIDTag> > <parentIDTag></parentIDTag> > </ROOT2> > <CHILD2.1> > <nodeIDTag>2.1</nodeIDTag> > <parentIDTag>2</parentIDTag> > </CHILD1.1> > <ROOT3> > <nodeIDTag>3</nodeIDTag> > <parentIDTag></parentIDTag> > </ROOT3> > <CHILD3.1> > <nodeIDTag>3.1</nodeIDTag> > <parentIDTag>3</parentIDTag> > </CHILD3.1> > </ROOTCOLLECTION> > > mark > > "Life Is a Such a B......" > > ----- Original Message ----- > From: Lauren Wood <lauren@s...> > To: <xml-dev@l...> > Sent: Thursday, August 24, 2000 12:27 PM > Subject: Re: XML and LDAP: Common APIs? > > > On 24 Aug 2000, at 13:58, Jeff Turner wrote: > > > > > Hi, > > > > > > I was just thinking how similar the XML and LDAP data models are. LDAP > > > gives you a tree, where each node can contain data -and- can act as a > > > namespace for other nodes. This corresponds pretty closely to XML (or > > > maybe SML). > > > > > > Has anyone explored the possibility of crossover APIs for accessing all > > > these 'tree-like' data structures in a standardised way? I'd like to be > > > able to traverse an LDAP directory with DOM or SAX. > > > > I can't see any reason why this shouldn't work; as long as you have > > some sort of tree structure, why not use getParentNode and have it > > return as close to the same thing as possible? Not everything from > > DOM or SAX will be applicable, but it would be good to have those > > methods which do the same thing being called the same as well, > > so the meaning is recognisable. > > > > On a side note, I've even had people talk to me about using DOM > > methods to walk a text document, where you map the lines into > > the equivalents of elements, with the line breaks being the > > demarcation between them. Then you can apply (some) DOM > > methods to the resulting tree. I'm still not sure why anyone would > > *want* to do this, but it's possible. > > > > > > > > > > Lauren > >
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








