This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes Using XPath to retrieve attribute values? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Using XPath to retrieve attribute values?" Watch "Using XPath to retrieve attribute values?" New topic
Author

Using XPath to retrieve attribute values?

Namitha karupaiya
Ranch Hand

Joined: Mar 10, 2004
Posts: 89
How can I retrieve the value of an attribute in an XML document using XPath?

For example, consider the followin XML fragment:

<message id=123>
</message>

I want to retrieve the value of id here?

Thank you very much.
Rajagopal Manohar
Ranch Hand

Joined: Nov 26, 2004
Posts: 183
How can I retrieve the value of an attribute in an XML document using XPath?

For example, consider the followin XML fragment:

<message id=123>
</message>

I want to retrieve the value of id here?



Namitha karupaiya
Ranch Hand

Joined: Mar 10, 2004
Posts: 89
Hi! Rajagopal Manohar!

Thank you very much, your reply is very very useful for me.

Bye for now.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Using XPath to retrieve attribute values?
 
Similar Threads
How to implement getElementById() with Xerces using XML Schema?
how to retrieve attribute value using xpath
xpath question
XSL Generating HTML
XPATH for IDREFS in XSL?