Re: XMLEncoder/XMLDecoder Beta 2

From: Kevin Menard (nirvdru..egativetwenty.net)
Date: Tue Dec 21 2004 - 12:47:23 EST

  • Next message: Andrus Adamchik: "Re: XMLEncoder/XMLDecoder Beta 2"

    Hi Andrus,

    Any comment on this?

    --
    Kevin
    

    On Dec 16, 2004, at 8:23 AM, Kevin Menard wrote: > >> >> You mean XML encoding map, not Cayenne DataMap? No, Cayenne doesn't >> have >> any support for that. IIRC our latest agreement was to keep WebObjects >> format for the XML map. Am I talking about the same thing? >> > > Sorry for the ambiguity. I meant java.util.Map. XMLEncoder currently > has: > > /** > * Utility method that prints all map values, > * assuming they are XMLSerializable objects. > */ > public void print(Map map) { > Iterator it = map.entrySet().iterator(); > while (it.hasNext()) { > Map.Entry entry = (Map.Entry) it.next(); > ((XMLSerializable) entry.getValue()).encodeAsXML(this); > } > } > > I wanted to provide an analog using JDOM, thus my encodeMap(). The > problem is that during decoding, I can't reconstruct the above map > because I don't know what the keys are. Likewise, I don't know when > Cayenne would ever create a map like this, so I was asking if it was > just legacy code.



    This archive was generated by hypermail 2.0.0 : Tue Dec 21 2004 - 12:49:23 EST