Question Concerning XML - Was: M5 is out

From: Adrian Wiesmann (awiesman..omap.org)
Date: Fri Jul 22 2005 - 14:50:30 EDT

  • Next message: Kevin Menard: "Re: Question Concerning XML - Was: M5 is out"

    Hello all

    > I am glad to announce 1.2M5 release. It has lots of new and cool
    > stuff. Check it out!

    I directly dove into the XMLEncoder/Decoder stuff. But I am having
    problems encoding a DataObjectList properly:

    SelectQuery sq = new SelectQuery(MyTable.class);
                
    DataContext context = gettingMyDataContext();
    DataObjectList dataObjectList = new
    DataObjectList(context.performQuery(sq));
                
    XMLEncoder xmlEncoder = new XMLEncoder();
    xmlEncoder.setRoot("table", "my.fully.specified.classname.MyTable");
    xmlEncoder.encodeList("table", dataObjectList);

    That gives me the root then only:
                    
    xmlEncoder.getXml(); -> <table type="my.fully.specified.classname.MyTable"
    />

    But where are the 30 test records?

    Has any of you some example for me to look into or has any of you an idea
    what I do wrong?

    If this works that could be an ideal replacement for my own hacked
    backup/restore mechanism.

    Regards and thanks,
    Adrian



    This archive was generated by hypermail 2.0.0 : Fri Jul 22 2005 - 14:52:25 EDT