You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Gabor Siklos <ga...@ugcs.caltech.edu> on 2001/08/07 03:23:46 UTC

how to get comments out?

this might be very easy but i couldn't get it to work.

i'm using the default SAX parser:

		parserFactory_ = SAXParserFactory.newInstance();
                parser_        = parserFactory_.newSAXParser(); 

but i can't get the " <!-- " type comments out of the parsed file using an
implementation of ContentHandler. which method gets called in case of a
comment like the above?

thanks,

-gabor


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


Re: how to get comments out?

Posted by Gabor Siklos <ga...@ugcs.caltech.edu>.
yup, it works. thanks.

-gabor

On Mon, 6 Aug 2001, dr bruce a pumplin wrote:

> Tom,
> 
> Many thanks for the tip, I didn't know about that interface.
> I thought comments were ignored in the interest of efficiency.
> 
> Dr. Bruce A. Pumplin
> 
> --- Tom Bradford <br...@dbxmlgroup.com> wrote:
> > Yes, you can...  It's called a LexicalHandler.  The interface
> > for it can
> > be found in org.xml.sax.ext
> > 
> > dr bruce a pumplin wrote:
> > > 
> > > Gabor,
> > > 
> > > You *can't* get them back.  The parser ignores them.
> > > 
> > > Dr. Bruce A. Pumplin
> > > 
> > > --- Gabor Siklos <ga...@ugcs.caltech.edu> wrote:
> > > > this might be very easy but i couldn't get it to work.
> > > >
> > > > i'm using the default SAX parser:
> > > >
> > > >               parserFactory_ =
> > SAXParserFactory.newInstance();
> > > >                 parser_        =
> > > > parserFactory_.newSAXParser();
> > > >
> > > > but i can't get the " <!-- " type comments out of the
> > parsed
> > > > file using an
> > > > implementation of ContentHandler. which method gets called
> > in
> > > > case of a
> > > > comment like the above?
> > > >
> > > > thanks,
> > > >
> > > > -gabor
> > > >
> > > >
> > > >
> > >
> >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > > > xerces-j-dev-unsubscribe@xml.apache.org
> > > > For additional commands, e-mail:
> > > > xerces-j-dev-help@xml.apache.org
> > > >
> > > 
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Make international calls for as low as $.04/minute with
> > Yahoo! Messenger
> > > http://phonecard.yahoo.com/
> > > 
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > xerces-j-dev-unsubscribe@xml.apache.org
> > > For additional commands, e-mail:
> > xerces-j-dev-help@xml.apache.org
> > 
> > -- 
> > Tom Bradford --- The dbXML Project --- http://www.dbxml.org/
> > We store your XML data a hell of a lot better than /dev/null
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > xerces-j-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail:
> > xerces-j-dev-help@xml.apache.org
> > 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


Re: how to get comments out?

Posted by dr bruce a pumplin <pu...@yahoo.com>.
Tom,

Many thanks for the tip, I didn't know about that interface.
I thought comments were ignored in the interest of efficiency.

Dr. Bruce A. Pumplin

--- Tom Bradford <br...@dbxmlgroup.com> wrote:
> Yes, you can...  It's called a LexicalHandler.  The interface
> for it can
> be found in org.xml.sax.ext
> 
> dr bruce a pumplin wrote:
> > 
> > Gabor,
> > 
> > You *can't* get them back.  The parser ignores them.
> > 
> > Dr. Bruce A. Pumplin
> > 
> > --- Gabor Siklos <ga...@ugcs.caltech.edu> wrote:
> > > this might be very easy but i couldn't get it to work.
> > >
> > > i'm using the default SAX parser:
> > >
> > >               parserFactory_ =
> SAXParserFactory.newInstance();
> > >                 parser_        =
> > > parserFactory_.newSAXParser();
> > >
> > > but i can't get the " <!-- " type comments out of the
> parsed
> > > file using an
> > > implementation of ContentHandler. which method gets called
> in
> > > case of a
> > > comment like the above?
> > >
> > > thanks,
> > >
> > > -gabor
> > >
> > >
> > >
> >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > > xerces-j-dev-unsubscribe@xml.apache.org
> > > For additional commands, e-mail:
> > > xerces-j-dev-help@xml.apache.org
> > >
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Make international calls for as low as $.04/minute with
> Yahoo! Messenger
> > http://phonecard.yahoo.com/
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> xerces-j-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail:
> xerces-j-dev-help@xml.apache.org
> 
> -- 
> Tom Bradford --- The dbXML Project --- http://www.dbxml.org/
> We store your XML data a hell of a lot better than /dev/null
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail:
> xerces-j-dev-help@xml.apache.org
> 


__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


Re: how to get comments out?

Posted by Tom Bradford <br...@dbxmlgroup.com>.
Yes, you can...  It's called a LexicalHandler.  The interface for it can
be found in org.xml.sax.ext

dr bruce a pumplin wrote:
> 
> Gabor,
> 
> You *can't* get them back.  The parser ignores them.
> 
> Dr. Bruce A. Pumplin
> 
> --- Gabor Siklos <ga...@ugcs.caltech.edu> wrote:
> > this might be very easy but i couldn't get it to work.
> >
> > i'm using the default SAX parser:
> >
> >               parserFactory_ = SAXParserFactory.newInstance();
> >                 parser_        =
> > parserFactory_.newSAXParser();
> >
> > but i can't get the " <!-- " type comments out of the parsed
> > file using an
> > implementation of ContentHandler. which method gets called in
> > case of a
> > comment like the above?
> >
> > thanks,
> >
> > -gabor
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > xerces-j-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail:
> > xerces-j-dev-help@xml.apache.org
> >
> 
> __________________________________________________
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org

-- 
Tom Bradford --- The dbXML Project --- http://www.dbxml.org/
We store your XML data a hell of a lot better than /dev/null

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


Re: how to get comments out?

Posted by dr bruce a pumplin <pu...@yahoo.com>.
Gabor,

You *can't* get them back.  The parser ignores them.

Dr. Bruce A. Pumplin


--- Gabor Siklos <ga...@ugcs.caltech.edu> wrote:
> this might be very easy but i couldn't get it to work.
> 
> i'm using the default SAX parser:
> 
> 		parserFactory_ = SAXParserFactory.newInstance();
>                 parser_        =
> parserFactory_.newSAXParser(); 
> 
> but i can't get the " <!-- " type comments out of the parsed
> file using an
> implementation of ContentHandler. which method gets called in
> case of a
> comment like the above?
> 
> thanks,
> 
> -gabor
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail:
> xerces-j-dev-help@xml.apache.org
> 


__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org