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 David --- <da...@yahoo.fr> on 2005/01/21 14:32:14 UTC

Re: Xml::Formatter help need ---- FIXED ---

the problem was coming from another file, actually not
related with XMLFormatter.....

Thanks for the tips, sometimes it helps a lot to know
that people are trying to help you..!!!!



 --- David --- <da...@yahoo.fr> a écrit : 
> Xml.h contains the following members among all the
> other required. 
> 
> ##Xml.h
> virtual void writeChars(const XMLByte* const
> toWrite);
> 
> virtual void writeChars(const XMLByte* const
> toWrite,
> const unsigned int count, XMLFormatter* const
> formatter);
> 
> ###Xml.cpp #####
> 
>  void Xml::writeChars(const XMLByte* const toWrite)
>  {
> 
>  }
> 
>  void Xml::writeChars(const XMLByte* const toWrite,
> const unsigned int count, XMLFormatter* const
> formatter)
>  {
>    XERCES_STD_QUALIFIER cout.write((char *) toWrite,
> (int) count);
>    XERCES_STD_QUALIFIER cout.flush();
> 
>  }
> 
> I know is not that easy without the code but i can
> send it to someone as i should compile normaly with
> xerces-26. I have spent a lot on that so any help
> would be helpfull. ..!!! 
> 
> 
> 
> 
>  --- Stefan A Letz <st...@de.ibm.com> a écrit
> : 
> > 
> > 
> > 
> > 
> > Hello David,
> > 
> > are you changing something else along with
> > commenting out the public
> > XMLFormatTarget interface?
> > 
> > It looks like you're trying construct an
> > XMLFormatter object in Xml::Xml()
> > using the private default constructor. I would
> guess
> > class Xml has a member
> > variable of type XMLFormatter that isn't being
> > initialized properly, e.g.
> > 
> > Xml::Xml(...)
> > : mFormatter("UTF-8", 0, this,
> > XMLFormatter::NoEscapes,
> > XMLFormatter::UnRep_CharRef)
> > {
> > } .
> > 
> > Stefan Letz.
> > 
> > 
> > 
> > 
> > 
> > 
> >                                                   
>  
> >                   
> >              David ---                            
>  
> >                   
> >              <danova_fr@yahoo.                    
>  
> >                   
> >              fr>                                  
>  
> >                    To
> >                                                   
>  
> >                   
> >              01/21/2005 11:18         
> > xerces-c-dev@xml.apache.org     
> >              AM                                   
>  
> >                    cc
> >                                                   
>  
> >                   
> >                                                   
>  
> >                   
> >              Please respond to                    
>  
> >                   
> >                xerces-c-dev                       
>  
> >                   
> >                                                   
>  
> >                   
> >                                                   
>  
> >               Subject
> >                                       
> > Xml::Formatter help need        
> >                                                   
>  
> >                   
> >                                                   
>  
> >                   
> >                                                   
>  
> >                   
> >                                                   
>  
> >                   
> >                                                   
>  
> >                   
> >                                                   
>  
> >                   
> > 
> > 
> > 
> > 
> > Hello,
> > I have written a sax parser that implements
> > xerces-c.
> > if i declare in my Xml.h the public
> XMLFormatTarget
> > i
> > get can't compile (see error below).
> > However if i compile but don't implement in the
> > class
> > the XMLFormatTarget it compiles and works
> properly.
> > 
> > Does anybody know what is the problem ???
> > 
> > thanks
> > 
> > [XmlXercesFactory]# make clean all
> > rm -f *.o *~ SaxParsing_classtest        *.a 
> *core*
> > *.xml *.xml_parsed
> > g++ -g -w -O2 -L/usr/local/lib XmlFactory.cpp -c
> -o
> > XmlFactory.o
> > g++ -g -w -O2 -L/usr/local/lib  SaxParser.cpp -c
> -o
> > SaxParser.o
> > g++ -g -w -O2 -L/usr/local/lib DomParser.cpp -c -o
> > DomParser.o
> > g++ -g -w -O2 -L/usr/local/lib Xml.cpp -c -o Xml.o
> >
>
/usr/local/include/xercesc/framework/XMLFormatter.hpp:
> > In constructor `Xml::Xml()':
> >
>
/usr/local/include/xercesc/framework/XMLFormatter.hpp:412:
> > error: `xercesc_2_6::XMLFormatter::XMLFormatter()'
> > is
> > private
> > Xml.cpp:5: error: within this context
> > make: *** [Xml.o] Error 1
> > 
> > I have different files show below:
> > 
> > ***********
> > XMLFactory.h
> > ***********
> > #include "Xml.h"
> > #include "DomParser.h"
> > #include "SaxParser.h"
> > 
> > class XmlFactory {
> > 
> >  public:
> > 
> >     XmlFactory(std::string v,bool d, bool n, bool
> s,
> > bool fs, std::string e);
> >     /*
> >  * Sets the appropiate xml parser defined by user
> >  * 2 possiblities:
> >  * Dom: Domparser works with a copy in memory of
> the
> > file
> >  * Sax: reads the xmlfile without keeping anything
> > in
> > memory*/
> > 
> >   Xml* setParser(std::string type);
> > 
> 
=== message truncated === 


	

	
		
Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails ! 
Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com/

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