commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christoph Gaffga \(triplemind.com\)" <cgaf...@triplemind.com>
Subject [betwixt] Support for Maps broken in 0.6.1-dev?!?!
Date Tue, 09 Nov 2004 11:31:13 GMT
hi,

I have some trouble with the latest version of betwixt. It seems to me that
the support for Maps is broken.

I tested with the following example:

  Map hash = new Hashtable();
  hash.put("de", "deutsch");
  hash.put("en", "english");
  hash.put("es", "espaniol");
  beanWriter = new BeanWriter(System.out);
  beanWriter.enablePrettyPrint();
  beanWriter.setWriteEmptyElements(false);
  beanWriter.getBindingConfiguration().setMapIDs(false);
  beanWriter.setXMLIntrospector(new XMLIntrospector());
  beanWriter.write(hash);

and get the follwoing result:

  <Hashtable>
    <empty>false</empty>
  </Hashtable>

when removing the setWriteEmptyElements(false) line, I get:

  <Hashtable>
    <empty>false</empty>
    <entry>
      <key>en</key>
      <value>english</value>
    </entry>
    <entry>
      <key>es</key>
      <value>espaniol</value>
    </entry>
    <entry>
      <key>de</key>
      <value>deutsch</value>
    </entry>
  </Hashtable>

So there seem to be a problem with supressing empty elements. And I wondered
why the empty-Property is written, should be suppressed.

Any help would be appreciated.

regards
Christoph Gaffga
cgaffga@triplemind.com



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