This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Groovy and the fly likes How to convert xml tag attribute values  to map object? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Languages » Groovy
Bookmark "How to convert xml tag attribute values  to map object?" Watch "How to convert xml tag attribute values  to map object?" New topic
Author

How to convert xml tag attribute values to map object?

Nazeer Ahammad
Ranch Hand

Joined: Feb 26, 2012
Posts: 43
Hi All,

Is it possible to convert xml tag attributes to map?

For an instance :
<students>
<student name="sname" id="sid" college="collegename">
</students>

by parsing this i have to get map object like [name:"sname", id:"sid",college:collegename]



Regards,
Nazeer
Pankaja Shinde
Ranch Hand

Joined: Sep 15, 2006
Posts: 87
http://groovy.codehaus.org/Reading+XML+using+Groovy's+XmlParser
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to convert xml tag attribute values to map object?