Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Groovy
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Groovy
How to get attribute names of XML tags in groovy?
Nazeer Ahammad
Ranch Hand
Posts: 43
posted 10 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi All,
I need one help. Please see the below xml file content
<students>
<student name="###" id="###" college="###"></student>
<students>
In the above xml, I need to display attribute student tag names(name,id and college).
How can i do this in Groovy.
Please help me.
Thanks,
Nazeer.
Mohamed Sanaulla
Bartender
Posts: 3225
34
I like...
posted 10 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I remember writing a blog post on parsing XML using XmlSlurper in Groovy where I have mentioned how to access the attribute name. The same can be found
here
.
PS: Sorry for plugging in my blog, but the post serves your query.
Mohamed Sanaulla |
My Blog
| Author of
Java 9 Cookbook
|
Java 11 Cookbook
Pankaja Shinde
Ranch Hand
Posts: 87
posted 10 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
http://groovy.codehaus.org/Reading+XML+using+Groovy's+XmlParser
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
?
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
how to retrieve value of attribute of an xml element tag using jsp
Parsing XML in Groovy
question about AttributeList interface
How to update the xml tag attributes for the given tag
Validations for form created with JSTL's x:transform
More...