Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / December 2005

Tip: Looking for answers? Try searching our database.

generate xpath for a node

Thread view: 
shailesh.gokhale@gmail.com - 08 Dec 2005 11:10 GMT
Hi,

Is there an api out there which can help me generate xpath for a node?

I mean I am navigating an xml using sax. On satisfaction of a
particular condition on a node I want to generate the xpath for that
node.

Any information will be much appreciated.

Thanks
Shailesh
Fiz - 08 Dec 2005 14:12 GMT
Try using XMLBeans (http://xmlbeans.apache.org/).
shailesh.gokhale@gmail.com - 09 Dec 2005 06:51 GMT
Hi,

Thanks for the info. I am in a process of evaluating.

Will post when done.

Thanks
Shailesh
Chris Smith - 08 Dec 2005 15:30 GMT
> Is there an api out there which can help me generate xpath for a node?
>
> I mean I am navigating an xml using sax. On satisfaction of a
> particular condition on a node I want to generate the xpath for that
> node.

If you're using SAX, then the parser hasn't kept enough information to
do any such thing.  Have you kept the necessary information?

Signature

www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation

shailesh.gokhale@gmail.com - 09 Dec 2005 06:46 GMT
Ok so it is not possible with SAX ... any idea if it is possible with
DOM?
Hiran Chaudhuri - 10 Dec 2005 14:13 GMT
> Ok so it is not possible with SAX ... any idea if it is possible with
> DOM?

What kind of XPath do you want to generate? Why is that not possible with
SAX?

Hiran
shailesh.gokhale@gmail.com - 12 Dec 2005 05:59 GMT
What do you mean ' ...  kind of xpath ' ? The xpath that we usually
use. Like - node/childNode2[0]/childchildNode - etc.

It is apparently not possible with sax because sax is only event based
parsing mechanism. It does not store info on the whole tree unless we
code to do so.

Therefore before coding such a thing I wanted to check if dom can give
me the xpath directly because it already has the tree information
stored.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.