Yes, that's what would be needed. I did some quick searches, thinking somebody would have done this already for one of the document models with XMLPull or StAX (which is basically a designed-by-committee version of XMLPull), but didn't find anything. Still, it's a simple enough API that it shouldn't be too difficult to implement.

 - Dennis

Nikita wrote:

Hello Dennis,



I would like to try.


Now it seems I have to implement XmlPullParser that reads JDOM and add
method IUnmarshallingContext.setParser(XmlPullParser newParser)

Right?




Thursday, July 21, 2005, 10:38:14 AM, you wrote:

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

DS>   - Dennis

DS> 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