From: Jimmy Z. <cra...@co...> - 2006-07-29 17:26:54
|
The navigation has to be based on some criteria (such as specificied in = an XPath expression). VTD navigator uses an array of integers to represent a particular = location in XML, "getCurrentIndex" only returns one those integers in the array... What would be the equivalent function calls in DOM that does what you = described?? ----- Original Message -----=20 From: tony yin=20 To: vtd...@li...=20 Sent: Saturday, July 29, 2006 8:20 AM Subject: [Vtd-xml-users] Need more arbitrary random access Hi all: I know the VTD-XML is based on some kind of cursor navigation. But I = searched all API docs and can't find how to random access the token I = wanted. Just a method: if (vn.toElement(VTDNav.NEXT_CHILD,"*")) {=20 //any action } I think it's not good enough to process my xml. I need another method = to achieve this: method(){ ancestorTokenIndex =3D vn.getCurrentIndex(); } ... foo(){ vn.toIndex(ancestorTokenIndex); int t =3D vn.getText(); String text =3D vn.toNormalizedString(t) ; ... } Why I need more arbitrary random access? I just need it. And I think = it's easy to implement because VTD-xml design concept, isn't it?=20 --=20 Kindly Regards Tony = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=20 -------------------------------------------------------------------------= ----- = -------------------------------------------------------------------------= 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=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV -------------------------------------------------------------------------= ----- _______________________________________________ Vtd-xml-users mailing list Vtd...@li... https://lists.sourceforge.net/lists/listinfo/vtd-xml-users |