wood burning stoves 2.0*
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
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

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Xml Parsing Question
 
Similar Threads
Writing XML element
help with web service to display xml file contents using netbeans
An exception in java-XML --kindly clarify-urgent
Display contents in GUI format
Extract full path when parsing XML