You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Andre Stock <Mr...@gmx.de> on 2004/06/11 09:36:32 UTC

RE: Simple SAX-C++-Parser Documentation - Newbie

Yes, i did! And a few problems are solved now, but how can i tell the
DefaultHandler what to do if an event occured? I recognized that the
DefualtHandler.cpp file is missing, do i have to implement it by myself or
do i have to create another class (for example Handler.cpp)which inherits
from the DefaultHandler.hpp and redefines the methods needed?
THX in advance
Andre

> Have you looked at the SAXPrint sample app? 
> 
> > -----Original Message-----
> > From: Andre Stock [mailto:Mr.doom@gmx.de] 
> > Sent: Wednesday, June 09, 2004 6:05 AM
> > To: xerces-c-dev@xml.apache.org
> > Subject: Simple SAX-C++-Parser Documentation - Newbie 
> > 
> > Hi!
> > I`ve various problems implementing a simple SAX Parser. The 
> > Parser have to
> > read from an XML stream. So if anyone can help me how to start or even
> > better have a simple parser code fragment for my purposes, 
> > i`ll be very
> > grateful for that. I don`t know which classes to use and how 
> > they depends on
> > each other. For example, what is the function of SAX2XMLReader and the
> > SAXParser classes? (and is the SAX2XMLReader way to bulky for 
> > solving my
> > problems?is there a smaller,sufficient class?)Is it necessary 
> > to override
> > all methods or how can I tell my application that an element 
> > was found (via
> > the DefaultHandler?) Sorry for all these (stupid) questions 
> > but I`m really
> > desperate! ;-)
> > THX
> > Andre
> > 
> > -- 
> > +++ Jetzt WLAN-Router für alle DSL-Einsteiger und Wechsler +++
> > GMX DSL-Powertarife zudem 3 Monate gratis* http://www.gmx.net/dsl
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> > 
> > 
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> 

-- 
+++ Jetzt WLAN-Router für alle DSL-Einsteiger und Wechsler +++
GMX DSL-Powertarife zudem 3 Monate gratis* http://www.gmx.net/dsl


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


RE: Simple SAX-C++-Parser Documentation - Newbie

Posted by Erik Rydgren <er...@mandarinen.se>.
The default handler is only a stub interface (it does nothing). As you
suggested you'll have to inherit the DefaultHandler and override the
methods you need.

/ Erik

> -----Original Message-----
> From: Andre Stock [mailto:Mr.doom@gmx.de]
> Sent: den 11 juni 2004 09:37
> To: xerces-c-dev@xml.apache.org
> Subject: RE: Simple SAX-C++-Parser Documentation - Newbie
> 
> Yes, i did! And a few problems are solved now, but how can i tell the
> DefaultHandler what to do if an event occured? I recognized that the
> DefualtHandler.cpp file is missing, do i have to implement it by
myself or
> do i have to create another class (for example Handler.cpp)which
inherits
> from the DefaultHandler.hpp and redefines the methods needed?
> THX in advance
> Andre
> 
> > Have you looked at the SAXPrint sample app?
> >
> > > -----Original Message-----
> > > From: Andre Stock [mailto:Mr.doom@gmx.de]
> > > Sent: Wednesday, June 09, 2004 6:05 AM
> > > To: xerces-c-dev@xml.apache.org
> > > Subject: Simple SAX-C++-Parser Documentation - Newbie
> > >
> > > Hi!
> > > I`ve various problems implementing a simple SAX Parser. The
> > > Parser have to
> > > read from an XML stream. So if anyone can help me how to start or
even
> > > better have a simple parser code fragment for my purposes,
> > > i`ll be very
> > > grateful for that. I don`t know which classes to use and how
> > > they depends on
> > > each other. For example, what is the function of SAX2XMLReader and
the
> > > SAXParser classes? (and is the SAX2XMLReader way to bulky for
> > > solving my
> > > problems?is there a smaller,sufficient class?)Is it necessary
> > > to override
> > > all methods or how can I tell my application that an element
> > > was found (via
> > > the DefaultHandler?) Sorry for all these (stupid) questions
> > > but I`m really
> > > desperate! ;-)
> > > THX
> > > Andre
> > >
> > > --
> > > +++ Jetzt WLAN-Router für alle DSL-Einsteiger und Wechsler +++
> > > GMX DSL-Powertarife zudem 3 Monate gratis* http://www.gmx.net/dsl
> > >
> > >
> > >
---------------------------------------------------------------------
> > > To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> > > For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> > >
> > >
> > >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> >
> 
> --
> +++ Jetzt WLAN-Router für alle DSL-Einsteiger und Wechsler +++
> GMX DSL-Powertarife zudem 3 Monate gratis* http://www.gmx.net/dsl
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org



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