This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Other JSE/JEE APIs and the fly likes Using Xpath in java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Using Xpath in java" Watch "Using Xpath in java" New topic

Using Xpath in java

uday kantt

Joined: May 05, 2011
Posts: 26

I have written a java program which reads a particular node if an xml file (an attribute of the node containing some data) is copied in to a String variable. The code is as follows


So now reading a particular node's attribute data is fine, but depending upon the attributes data its parent node's attribute data is supposed to be read(travel up) is this possible or not, please help.
Thank you
Rajkamal Pillai
Ranch Hand

Joined: Mar 02, 2005
Posts: 445

What happens when you do that?
uday kantt

Joined: May 05, 2011
Posts: 26

Hi kamal
Just i want that parent node copied into the string variable so that i and send it to the database.
I agree. Here's the link:
subject: Using Xpath in java
It's not a secret anymore!