commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Aust <christ...@wilde-welt.de>
Subject Re: [xml]java.util.Map to xml
Date Thu, 09 Jun 2005 13:30:29 GMT
Hi,

Philip Donaghy schrieb:
> Does anyone know the fastest way from a Map to xml?

have a look a commons-betwixt:

BeanWriter writer = new BeanWriter(System.out);
Map m = new HashMap();
m.put("myKey", "some Value");
writer.write(m);

will write:

<?xml version="1.0" ?>
   <HashMap id="1">
     <empty>false</empty>
     <entry id="2">
       <key>myKey</key>
       <value>some Value</value>
     </entry>
   </HashMap>

The process is fully configurable. Fast enough? Regards,

-  Christian

-- 

Christian Aust
mailto:christian@wilde-welt.de
icq: 84500990 - Yahoo!: datenimperator - MSN: datenimperator
PGP: A94E 0181 664D 27E3 F05A  A751 6A7E 90D1 A0A3 DEC7

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message