my dog learned polymorphism*
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 Android Security Essentials Live Lessons this week in the Android 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

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