This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java in General and the fly likes Xml Parsing Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Xml Parsing Question" Watch "Xml Parsing Question" New topic
Author

Xml Parsing Question

John Schretz
Ranch Hand

Joined: Sep 10, 2008
Posts: 188
Hi I need to parse the following line out of this xml:
<PostagePrice TotalAmount="10.85">

I am able to use the below code to parse out other tags, however i cant figure out how to get the numeric value out of that particular tag
Any help would be appreciated

thanks
john



Balu Sadhasivam
Ranch Hand

Joined: Jan 01, 2009
Posts: 874


John,



Check getAttributes() method for the Node will lead you to the value.


John Schretz
Ranch Hand

Joined: Sep 10, 2008
Posts: 188
Balu Sadhasivam wrote:
John,



Check getAttributes() method for the Node will lead you to the value.




Thanks, that did the trick

Solution below

 
Don't get me started about those stupid light bulbs.
 
subject: Xml Parsing Question
 
Similar Threads
help with web service to display xml file contents using netbeans
Extract full path when parsing XML
Writing XML element
Display contents in GUI format
An exception in java-XML --kindly clarify-urgent