Luciano Bezerra
Luciano Bezerra

Reputation: 35

how to customize xml headers

I have a resultSet formed by:

LazyList<DeliveryLabel> deliveryLabels = DeliveryLabel.findBySQL(sql);
String wxml = deliveryLabels.toXml(true, true);

The xml generated start with:

<delivery_labels>
  <delivery_label>
    <data>
  </delivery_label>
</delivery_labels>

how to generate only:

<labels>
  <label>
    <data>
  </label>
</labels>

I´m can´t rename the class to Label.java, because it already exists in the project.

[]´s

Upvotes: 0

Views: 69

Answers (1)

ipolevoy
ipolevoy

Reputation: 5518

Currently ActiveJDBC uses Inflections to pick names for XML tags. If you need custom tags or structure, you will have to implement a custom toXml() method.

Upvotes: 0

Related Questions