You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ecs-user@jakarta.apache.org by "Peter A. Cassetta" <pe...@fingertipsoft.com> on 2002/08/08 18:30:20 UTC

Closing empty elements with /> on the Start tag

The XML being generated by ECS is quite bulky due to many unnecessary closing
tags.

My file uses a lot of attribute-only tags:

1. <start attr1="value" attr2="value"/>

When I output via ECS I get:

2. <start attr1="value" attr2="value"></start>

Is there an easy way to have empty elements automatically closed by just
prepending "/" before closing the opening tag (as in "1" above)?

Thanks.

Pete Cassetta

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Closing empty elements with /> on the Start tag

Posted by Stephan Nagy <sn...@sbcglobal.net>.
just call setNeedClosingTag(false);

-stephan

----- Original Message -----
From: "Peter A. Cassetta" <pe...@fingertipsoft.com>
To: <ec...@jakarta.apache.org>
Sent: Thursday, August 08, 2002 11:30 AM
Subject: Closing empty elements with /> on the Start tag


> The XML being generated by ECS is quite bulky due to many unnecessary
closing
> tags.
>
> My file uses a lot of attribute-only tags:
>
> 1. <start attr1="value" attr2="value"/>
>
> When I output via ECS I get:
>
> 2. <start attr1="value" attr2="value"></start>
>
> Is there an easy way to have empty elements automatically closed by just
> prepending "/" before closing the opening tag (as in "1" above)?
>
> Thanks.
>
> Pete Cassetta
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>