commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ricardo Gladwell <>
Subject [Betwixt] Removing id attributes and conditional
Date Fri, 13 May 2005 16:58:02 GMT
Hi All,

I'm writing some Java beans to XML and getting some odd results. 
Firstly, Betwixt is adding an "id" attribute to all my objects (see 
sample payment.xml below). How do I configure Betwixt stop this behaviour?

I also would like to switch tags based on the type of an object 
returned. For example, I have a Customer object that returns a BankAccount:

public abstract class BankAccount {}

public class Customer {
   BankAccount bankAccount;
   public BankAccount getBankAccount() { return bankAccount; }

public class AustrianBankAccount extends BankAccount {

I have the following betwixt file which specifies that the root tag for 
an AustrianBankAccount is "bankAccount-AT":

<?xml version="1.0" encoding="UTF-8" ?>
<info primitiveTypes="element">
   <element name="bankAccount-AT">
     <addDefaults />

But, in my results it still returns a "bankAccount" tag. How do I 
enforce this behaviour?

// payment.xml
<?xml version="1.0"?>
<!DOCTYPE paymentService PUBLIC "-//Bibit//DTD Bibit PaymentService v1//EN"

<paymentService id="1" merchantCode="OPODOPAYOUTEUR" version="1.3">
<shopper id="2">
<bankAccount id="3">

Kind regards...

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message