Title: Message
The answer is yes, but how I am not sure!!! Not sure if you have to create your own handler or that you can use the location attribute.
 
Also does ABC exist in the Java class code ? If so you can map it and define the sub class it maps to to be empty.
 
location: (since 0.9.4.4) allows the user to specify the "sub-path" for which the value should be marshalled to and from. This is useful for "wrapping" values in elements or for mapping values that appear on sub-elements to the current "element" represented by the class mapping. For more information see the Location attribute below
 
Hope this helps I am also a beginner with castor.
 
 
Cheerios
 
-----Original Message-----
From: Sunit Bhatia [mailto:[EMAIL PROTECTED]
Sent: Friday, July 18, 2003 7:22 PM
To: [EMAIL PROTECTED]
Subject: [castor-dev] Mapping File related question

HI,

Is it possible to insert certain XML elements using a mapping file ?

 

e.g. if I have the objects which map to following XML:

 

<ROOT1>

   <ROOT2>

      <XYZ> </XYZ>

      <MNO> </MNO>

      <ABC> </ABC>

      <ABC> </ABC>

    </ROOT2>

</ROOT2>

 

Then can I insert an <ABC> element at the top of the <ROOT2>’s children, like this:

 

<ROOT1>

   <ROOT2>

      <ABC> </ABC>  à New Element inserted

      <XYZ> </XYZ>

      <MNO> </MNO>

      <ABC> </ABC>

      <ABC> </ABC>

    </ROOT2>

</ROOT2>

 

 

Thanks

Sunit

 

 

Reply via email to