Re: Question Concerning XML - Was: M5 is out

From: Kevin Menard (kmenar..ervprise.com)
Date: Fri Jul 22 2005 - 17:30:01 EDT

  • Next message: Jeff de Vries: "LIMIT and OFFSET?"

    Hi Adrian,

    On Jul 22, 2005, at 2:50 PM, Adrian Wiesmann wrote:

    >
    > 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"
    > />
    >

    Are your objects simply DataObjects or are they CayenneDataObjects?
    If the former, than you need to provide an explicit mapping. This
    can be done by providing a mapping file or by implementing
    XMLSerializable. If the latter, CayenneDataObject provides a default
    implementation of the methods in the XMLSerializable interface.

    -- 
    Kevin
    



    This archive was generated by hypermail 2.0.0 : Fri Jul 22 2005 - 17:30:04 EDT