Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Sapphire » XMLAttribute binding
XMLAttribute binding [message #721496] Thu, 01 September 2011 22:43 Go to next message
Nepomuk Seiler is currently offline Nepomuk SeilerFriend
Messages: 88
Registered: December 2010
Member
Hi again,

Is there a way to bind XML Attributes, like with the javax.xml.annotation.XMLAttribute annotation? I want to look my XML as follows:

<nodes>
  <node id="nodeId">content</node>
</nodes>


thx,
Muki
Re: XMLAttribute binding [message #721510 is a reply to message #721496] Fri, 02 September 2011 00:18 Go to previous message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 1077
Registered: July 2009
Senior Member
Use @XmlBinding( path = "@id" ). The '@' character reference an attribute as opposed to a child element. You can also do @XmlBinding( path = "foo/bar/@xyz" ) to traverse down the XML tree and binding to an attribute.

- Konstantin
Previous Topic:Binding OSGi Service to model
Next Topic:Unmarshall XML in Model
Goto Forum:
  


Current Time: Fri Mar 29 12:54:51 GMT 2024

Powered by FUDForum. Page generated in 0.02838 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top