Hello Dennis,
Thursday, October 28, 2004, 8:13:54 AM, you wrote:
DS> You have to specify the dom4j marshaller/unmarshaller at the point where
DS> you want to use a dom4j subtree. For some (undocumented) samples, see
DS> the build/test/extras directory of the distribution and look at the Java
DS> code and bindings with dom4j in the names.
DS> - Dennis
DS> Tanya Dudka wrote:
>>Hello!
>>I'm just starting working with JiBX, and I have a problem with using it.
>>I have such kind of XML file
>>
>><?xml version="1.0" encoding="UTF-8"?>
>><model>
>><place>
>><svg>
>><rect width="35.0" x="35.0" height="5.0" y="103" style="stroke:
>>rgb(0, 0, 0); fill: lightgray;"/>
>></svg>
>></place>
>></model>
>>
>>I need to unmarshall it to the following Java class, where <svg> element form a XML
>>file
>>is mapped to the svgPlace field (DOM Element) as one element.
>>
>>import org.dom4j.Element;
>>public class Model {
>> public Place place;
>> }
>>public class Place {
>> public Element svgPlace;
>>}
>>
>>I wrote binding for it
>>
>><binding>
>> <mapping name="model" class="Model">
>> <structure name="place" field="place">
>> <value name="svg" field="svgPlace"/>
>> </structure>
>> </mapping>
>></binding>
>>
>>and while trying to compile the bindings I received the error:
>>
>>org.jibx.runtime.JiBXException: No deserializer for
>>org.dom4j.Element; define deserializer
>>or constructor from java.lang.String
>>
>>Please, tell me what I am doing wrong and where I can find
>>examples of using dom4j with the JiBX.
>>
DS> -------------------------------------------------------
DS> This SF.Net email is sponsored by:
DS> Sybase ASE Linux Express Edition - download now for FREE
DS> LinuxWorld Reader's Choice Award Winner for best database on Linux.
DS> http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
DS> _______________________________________________
DS> jibx-users mailing list
DS> [EMAIL PROTECTED]
DS> https://lists.sourceforge.net/lists/listinfo/jibx-users
Thank you for your answer, it helps a lot.
I have another question . When I unmarshal to org.w3c.dom.Element, I would like to use
my Document
instance (SVG document provided by Batik). How can I do this?
--
Best regards,
Tanya mailto:[EMAIL PROTECTED]
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
jibx-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jibx-users