You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Desmond Wong <de...@yahoo.com> on 2003/02/10 05:01:34 UTC

[Betwixt]How to do not printout the element with empty attribute or child element

If I don't want to print out the element with empty
attibutes or child elements, for example <student/> in
the xml file, what should I do? Thanks you.

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

Re: [Betwixt]How to do not printout the element with empty attribute or child element

Posted by robert burrell donkin <ro...@blueyonder.co.uk>.
On Monday, February 10, 2003, at 09:12 AM, Martin van den Bemt wrote:

> Desmond,
>
> It does write empty elements under certain conditions.Since that looks
> very sloppy, I was planning on elemenating all empty elements, since
> they don't have any use.
> Do you have any specific reasons why you want to be able to print empty
> elements ?

one example i can think of is a <load-on-startup/> element of a war 
deployment descriptor.

i was thinking about adding a property to BeanWriter which would allow 
empty element writing to be turned off. maybe this property should default 
to not writing since that seems likely to be the most common setting.

maybe later, we could add more finely grained control by add attribute 
which would override this setting to the .betwixt file.

comments?

- robert


Re: [Betwixt]How to do not printout the element with empty attribute or child element

Posted by Martin van den Bemt <ml...@mvdb.net>.
Desmond,

It does write empty elements under certain conditions.Since that looks
very sloppy, I was planning on elemenating all empty elements, since
they don't have any use. 
Do you have any specific reasons why you want to be able to print empty
elements ? 

Mvgr,
martin

On Mon, 2003-02-10 at 05:01, Desmond Wong wrote:
> If I don't want to print out the element with empty
> attibutes or child elements, for example <student/> in
> the xml file, what should I do? Thanks you.
> 
> __________________________________________________
> Do You Yahoo!?
> Everything you'll ever need on one web page
> from News and Sport to Email and Music Charts
> http://uk.my.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 
>