xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James McCarthy" <jam...@webxi.com>
Subject RE: SAX Handler Question
Date Sat, 29 Jan 2000 13:23:32 GMT
I was not aware of the Locator. When I read about it and tested what you
said it worked.

Thanks for your help.

Jim

> -----Original Message-----
> From: Pierpaolo Fumagalli [mailto:pier@apache.org]
> Sent: Friday, January 28, 2000 8:44 PM
> To: general@xml.apache.org
> Subject: Re: SAX Handler Question
>
>
> James McCarthy wrote:
> >
> > I am trying to parse an XML file and then reproduce it (or a
> portion of it)
> > from the handler events, how do you tell the difference between a />
> > terminated tag and an empty one.
> >
> > For example, how do I know the difference between "<MYTAG
> ATTRIBUTE="DATA"
> > />" and "<MYTAG ATTRIBUTE="DATA"></MYTAG>" from the SAX events.
> >
> > I would like to keep the exact content of the input file or
> portions of the
> > input file that I am sending on.
>
> I think that, if you use sax, you can use the locator to exactly
> differentitate those. If you have <ELEM></ELEM> the values for
> getColumnNumber() and getLineNumber() are different, while if you have
> <ELEM/> they (should) be the same...
> Check it out...
>
> 	Pier
>
> --
> --------------------------------------------------------------------
> -          P              I              E              R          -
> stable structure erected over water to allow the docking of seacraft
> <mailto:pier@betaversion.org>    <http://www.betaversion.org/~pier/>
> --------------------------------------------------------------------
> - ApacheCON Y2K: Come to the official Apache developers conference -
> -------------------- <http://www.apachecon.com> --------------------


Mime
View raw message