Hi Guy,
From your sample, you should be able to use a binding of this type:
<mapping name="InvList" ...>
<structure name="Invocation" ...>
<value name="Name" style="attribute" field="name"/>
<collection field="params">
<structure name="Param" type="ParamInfo">
<value name="Name" style="attribute" field="name"/>
<value name="Type" style="attribute" field="type"/>
<value style="text" field="content"/>
</structure>
</collection>
<collection field="field">
<structure name="Field" type="FieldInfo">
...
where ParamInfo is:
public class ParamInfo {
private String name;
private String type;
private String content;
...
}
For the empty Param elements you'll have a zero-length string as the
"content" value.
I'm not sure what you mean by Field having a recursive structure; if it
means that it can contain another Invocation you can handle this by
including an optional Invocation item within the FieldInfo structure.
- Dennis
Guy Hacham wrote:
Hi,
I have a somewhat not that common xml:
<?xml version="1.0" standalone="yes"?>
<InvList>
<Invocation Name="serviceName">
<Param Name="Param1" Type="Date">06/07/2004 07:39: 19.994 GMT</Param>
<Param Name="Param2" Type="Map">
<Field Name="000" Type="complexType">
<Field Name="Text" Type="MessageText">This is a message text</Field>
<Field Name="Kind" Type="Kind">KIND_1</Field>
</Field>
</Param>
</Invocation>
</InvList>
I need help in creating the appropriate binding.xml so I can retrieve
both Name and Type attributes and the cdata value of the Param element.
As you can see the Param element can be "simple", as in Param1 and a
little bit more complex like in Param2.
The same goes also fo Field, which also can create a recursive structure.
Any help will be welcome.
Thanks,
Guy.
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users