aspose file tools*
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 Java 8 in Action this week in the Java 8 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?
 
Similar Threads
struts+spring+hibernate
I'm not able to insert record in Derby using Hibernate
Could not read mappings from resource(Mapping issue)
xml to java objects
How to get attribute names of XML tags in groovy?