I can't get betwixt to write an attribute that is empty ("").
Here's de .betwixt file:
------------------
------------------
This is the class:
------------------
public class InterconexionSETI
{
private String idOrigen;
private String cuitOrigen;
private String idMensaje;
private String fechaGeneracion;
private String fechaExpiracion;
private String cuitUsuario;
[...]
}
------------------
This is the mapping rutine:
------------------
StringWriter resultWriter = new StringWriter();
BeanWriter writer = new BeanWriter(resultWriter);
writer.getBindingConfiguration().setMapIDs(false);
//writer.getBindingConfiguration().setValueSuppressionStrategy(ValueSupp
ressionStrategy.ALLOW_ALL_VALUES);
writer.enablePrettyPrint();
try {
writer.write(setiBean);
}
catch (IOException ioex) { }
catch (SAXException saxex) { }
catch (IntrospectionException iex) { }
return resultWriter.toString();
------------------
I get the following xml:
------------------
------------------
Where the element doesn't include the "system" attribute.
I've tried using the ValueSuppressionStrategy.ALLOW_ALL_VALUES, but I
get the following xml:
------------------
------------------
What am I doing wrong??
---
Juan Eduardo Vicente
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org