Hi,
        if you really want to do this then you are going to have to detect 
when an element is empty. Take a look in SAX2PrintHandlers. Currently the 
start tag is written out as soon as soon as startElement is called. You 
could stop this from happening and only print it out once you have some 
content. Then, in endElement if it has not yet been printed out you know 
it is an empty tag and can act accordingly.

Gareth


On Wed, 19 Feb 2003, Tarkus, Anand (LNG-DAY) wrote:

> Hi,
> I am relatively new to the XML world, please excuse me if there is an easy
> solution to the problem stated below.
> 
> The output xml document printed by SAX2Print is not exactly the same as the
> input document. 
> data/personal.xml was given as input to this utility and one difference that
> I am concerned about solving is:
> 
> Input documents line:
> <link manager="Big.Boss"/>
> is printed in output document as:
> <link manager="Big.Boss"></link>
> 
> Given my applications requirements this change is not acceptable and it is
> desired that the output document be printed exactly same as the input
> document. However it seems there is no easy way to distinguish the
> endElement event fired for an empty-element tag from the endElement event
> fired for an endtag, could somebody help please.
> 
> Thanks in advance.
> Anand.
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-- 
Gareth Reakes, Head of Product Development  +44-1865-203192
DecisionSoft Limited                        http://www.decisionsoft.com
XML Development and Services




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to