Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » MOXy: Is it possible to generate xml node name based on the value of another attribute(MOXy: Is it possible to generate xml node name based on the value of another attribute)
MOXy: Is it possible to generate xml node name based on the value of another attribute [message #1697939] Tue, 09 June 2015 17:05
Bruce Conrad is currently offline Bruce ConradFriend
Messages: 11
Registered: July 2009
Junior Member
Really glad I found MOXy. It's exactly what I was looking for. I have a question.

Is it possible to generate xml node name based on the value of another attribute? For example:
public class Part {
private String name ="someName";
private String partNumber = "A123";
private String partType = "myPartType";
}

I would like xml that looks like:
<myPartType>
<name>someName</name>
<partNumber>A123</partNumber>
</myPartType>

I don't want to have a separate Part class for every partType. I want to have one Part class and generate xml using partType as the base node.
Previous Topic:Using SQL() function in the FROM clause
Next Topic:CDI injection in an entity listener using Tomcat and Weld doesn't appear to work
Goto Forum:
  


Current Time: Fri Dec 06 05:52:56 GMT 2024

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

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

Back to the top