This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum 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
Register / Login


JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Xml Parsing Question" Watch "Xml Parsing Question" New topic
Author

Xml Parsing Question

John Schretz
Ranch Hand

Joined: Sep 10, 2008
Posts: 171
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: 171
Balu Sadhasivam wrote:
John,



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




Thanks, that did the trick

Solution below

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Xml Parsing Question
 
Similar Threads
Display contents in GUI format
Extract full path when parsing XML
An exception in java-XML --kindly clarify-urgent
help with web service to display xml file contents using netbeans
Writing XML element