"Tarkus, Anand (LNG-DAY)" <[EMAIL PROTECTED]> wrote:
> 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>
Not surprising. Either form is acceptable and they are
logically-equivalent documents.
> 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.
If that's the case, then XML is not appropriate for your application.
There are many aspects of the lexical representation of a document that are
not preserved during parsing, and XML applications must not care about
those which are not. Get a good book on XML and read about the XML
Information Set (the Infoset) to understand what information is relevant
and what is not.
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]