users@jaxb.java.net

FW: How to remove a tag?

From: Sharon Dafner <sharon_at_int2001.co.il>
Date: Wed, 30 Jul 2008 18:17:52 +0200

Hi,

sometimes I need to remove a tag (that holds text or enum value) from the
xml message. If I set the value to null I am left with an empty tag in the
output message. How can I destruct such tag?

Here is an example:
<YYY>
        <XXX>abc</XXX>
        <ZZZ>efg</ZZZ>
<YYY>

if I set to null XXX via pointer to the object that manages YYY then I am
left with:

<YYY>
        <XXX></XXX>
        <ZZZ>efg</ZZZ>
<YYY>

and I want:
<YYY>
        <ZZZ>efg</ZZZ>
<YYY>

anybody knows?

another solution to my problem would be not to marshall empty tags. Any one
knows of a simple way to this? can I set the marshaller to do this or easily
write my own marshaller (code examples here will be appreciate).

Thanx,
Sharon Dafner

2001 Computer & System Services Ltd
Phone: 972-(3)-6474145 x9202
Mobile: 972-(54)-4859202
Fax: 972-(3)-6474127
Email: sharon_at_int2001.co.il
Web: www.int2001.co.il

No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.524 / Virus Database: 270.5.7/1580 - Release Date: 29/07/2008
17:26

No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.524 / Virus Database: 270.5.7/1580 - Release Date: 29/07/2008
17:26