Hi,

I would like to encapsulate the Jibx handling in a separate, convinience class, like:

PSEUDO code:
class MyMain:
    MyJIBX mj = new MyJIBX( class_to_parse_to, file_to_parse);
    while !mj.isEnd():
       Object o = MyJIBX.umcntx.unmarshalElement();
       do_something_with_object

class MyJIBX:
    MyJIBX( class_to_parse_to, file_name_to_parse):
        this.bf = BindingDirectory.getFactory( class_to_parse_to);
        this.uctx = (UnmarshallingContext)
                             this.bf.createUnmarshallingContext();
        this.uctx.setDocument( file_to_parse, null);
    isEnd():
        return this.uctx.isEnd()
    unmarshalElement():
        return this.uctx.unmarshalElement()

===============================================
I got an error message indicating that I may have not done the binding:
Unable to access binding information for class java.lang.String
Make sure the binding has been compiled
java.lang.NoSuchFieldException: JiBX_bindingList

As the same code, but everything placed in class MyMain main function is working, I am sure there is no problem with the binding/jibx. I think I miss some basic java knowledge.

I would be happy to have a convinience class...
Thanks for your opinion, help!
Tamas

--
Tamas Hegedus, PhD          | phone: (1) 919-966 0329
UNC - Biochem & Biophys     | fax:   (1) 919-966 5178
5007A Thurston-Bowles Bldg  | mailto:[EMAIL PROTECTED]
Chapel Hill, NC, 27599-7248 | http://biohegedus.org


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to