Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within XML
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
Tim Cooke
Ron McLeod
paul wheaton
Jeanne Boyarsky
Sheriffs:
Paul Clapham
Devaka Cooray
Saloon Keepers:
Tim Holloway
Roland Mueller
Himai Minh
Bartenders:
Forum:
XML and Related Technologies
JAXB adding attribute to collection element
matej spac
Greenhorn
Posts: 28
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hello,
I have a class which looks like this:
@XmlRootElement(name="root") public class MyClass { @XmlElementWrapper(name="list") @XmlElement(name="item") private List<String> myList = new ArrayList<String>(); // getters, setters }
I want to add an attribute "someAttr" to "list" element to reach following xml:.
<root> <list someAttr="someValue"> <item>a</item> <item>b</item> ... </list> </root>
Is this possible in some way?
|OCPJP 6|
Don't get me started about those stupid
light bulbs
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Why I can't retrieve records stored in a XMLFile correctly?
Recursive program help
XML One liners for the exam....
problem in Tiles2 intrigation with jsf when we keep jsp in folder location
at org.apache.myfaces.tomahawk.application.jsp.JspTilesTwoViewHandlerImpl.getServletMapping
More...