xerces-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bovy, Stephen J" <STEPHEN.B...@ca.com>
Subject RE: DOMInputSource and BinInputStream ???
Date Thu, 22 Apr 2004 17:18:31 GMT
Thanks for the feedback,  I realized though that I was doing the wrong
thing:

Here is the correct approach:

MemBufInputSource* memBufIS = NULL;      
Wrapper4InputSource* domBufIS = NULL;    

memBufIS = new MemBufInputSource                    
(                                                   
    (const XMLByte*) sfile.ipc->pbuff               
    , sfile.ipc->leng                               
    , gMemBufId                                     
    , false                                         
);                                                  
 

domBufIS = new Wrapper4InputSource ( memBufIS );     

if ( sfile.ipc ) {                                        
  doc = sstate->doc = sstate->parser->parse(*domBufIS);   
} else {                                                  
  doc = sstate->doc = sstate->parser->parseURI(xmlFile);  
} // endif in memory parse                                

delete domBufIS;
delete memBufIS;


-----Original Message-----
From: Gareth Reakes [mailto:gareth@parthenoncomputing.com] 
Sent: Thursday, April 22, 2004 3:17 AM
To: xerces-c-dev@xml.apache.org
Subject: Re: DOMInputSource and BinInputStream ???

Hi,
	without knowing what you are trying to achieve it is hard to
know if this is the best way to do it, however, the code looks OK to me.

Gareth


On Wed, 21 Apr 2004, Bovy, Stephen J wrote:

> How can I use DOMInputSource so that it uses a BinInputStream ????
>
> Any suggestions would be greatly appreciated
>
> Can I do the following:
>
> class myinput : DOMInputSource, BinMemInputStream {
>
> public:
>
>   myinput ( ) { };
>
>  ~myinput ( ) { };
>
>  BinInputStream* makestream ( ) { return this };
>
> }
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>

-- 
Gareth Reakes, Managing Director      Parthenon Computing
+44-1865-811184                  http://www.parthcomp.com

---------------------------------------------------------------------
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


Mime
View raw message