|
From: Jimmy Z. <cra...@co...> - 2006-07-31 07:25:24
|
I just want to add to Tatu's comment... People usually navigates XML's metadata to get to the real data, so when you navigate you can just store the index value of text tokens, and you should be able to find a work around that does not require you to store a lot of cursor locations, For your example, why don't u just store the index values for AAA, BBB, CCC??? ----- Original Message ----- From: "Tatu Saloranta" <cow...@ya...> To: <vtd...@li...> Sent: Sunday, July 30, 2006 7:42 PM Subject: Re: [Vtd-xml-users] Need more arbitrary random access > --- tony yin <gao...@gm...> wrote: > >> Well. For example: >> <root> >> <child>AAA</child> >> <child>BBB</child> >> <child>CCC</child> >> ... >> </root> >> When processing XML doc in DOM I can reserve every >> node references in my >> code and exactly retrieve the 2nd "<child>" node >> back at anytime I wanted, >> there is no need to traverse. That's the point I > > But VTD-XML uses a simple integer index to refer to > all pieces (tokens, similar to nodes, except bit more > fine-grained, and bound to physical syntactic > components of xml document) of the document. > So you'll just need to store these indexes, just like > you would Dom Nodes. And that index then needs to > given as argument, either directly to methods, or to > 'traverse' global pointer (can't remember if VTD-XML > had both types of methods). > > Does this make sense? > > -+ Tatu +- > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Vtd-xml-users mailing list > Vtd...@li... > https://lists.sourceforge.net/lists/listinfo/vtd-xml-users > |