The way to handle this would be to create a wrapper that provides an XMLPull parser interface for reading a DOM, then use that like a parser. I haven't checked to see if there's an implementation of this already available, but if not it shouldn't be too difficult to create it if you understand DOM - the wrapper would just go through the DOM nodes in document order (so always keep the current node, then when next() is called you move to the next one). If you want to try writing this to contribute to the project I can give you general advice on the implementation and make sure there's a way to use it.

 - Dennis

Nikita wrote:

Hello Andreas,


That would be great if you send this.

But it solves only a half of the problem. There is no interface called
like IXMLReader for unmarshalling from different xml sources. Code is
very coupled with pull parser. It seems I can only convert my DOM
representation into text and give it to JiBX as it wants. But it
contains unnecessary parsing. Is there any other way?


Wednesday, July 20, 2005, 4:58:04 PM, you wrote:
AB> Hi Nikita,

AB> it is possible with a custom implementation of the IXMLWriter interface.

AB> I've written one that marshalls into a JDOM Document and officially
AB> contributed it. It is not yet integrated into the main distribution
AB> though. If you need it right away I could send you a recent CVS checkout
AB> with all changes.

AB> Regards,
AB> Andreas

AB> Nikita wrote:
Hello jibx-users,

 Is that possible to map java objects to tree structures like DOM and
 others?

 I need it to convert java objects into custom binary xml format and
 I don't want to do superfluous xml parsing.




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to