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:[EMAIL PROTECTED] 
Sent: Thursday, April 22, 2004 3:17 AM
To: [EMAIL PROTECTED]
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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to