Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to convert xml tag attribute values to map object?

 
Nazeer Ahammad
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://groovy.codehaus.org/Reading+XML+using+Groovy's+XmlParser
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic