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 "Deepak Goyal (Emp Code 2470)" <De...@headstrong.com> on 2007/08/23 10:23:15 UTC

Dom Object from memory buffer

I have XML in a string/memory buffer, which I converted to a
MemBufInputSource. I would like to make a DOM from this data, but I
cannot see how to do this.

Is there a way to easily create a DOM from memory/MemBufInputSource
much like the way the DOMCount example creates the DOM from an xml
file? I don't want to write the memory to a file then pass the
filename that to DOMBuilder: parseURI, that would be 
inefficient.
 
Regards
Deepak


 
***The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review,retransmission,dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.***

Re: Dom Object from memory buffer

Posted by Umesh Chandak <um...@gslab.com>.
Hi,
Here is the small snippet of code which worsk for me. 
InputSource *tempXMLInputSource = new MemBufInputSource((const XMLByte *
const)memBuffer, memBufferLength,bufid, 0,
XMLPlatformUtils::fgMemoryManager);
parser->parse(*tempXMLInputSource);

Thanks.
Regards,
Umesh
On Thu, 2007-08-23 at 13:53 +0530, Deepak Goyal (Emp Code 2470) wrote:
> I have XML in a string/memory buffer, which I converted to a
> MemBufInputSource. I would like to make a DOM from this data, but I
> cannot see how to do this.
> 
> Is there a way to easily create a DOM from memory/MemBufInputSource
> much like the way the DOMCount example creates the DOM from an xml
> file? I don't want to write the memory to a file then pass the
> filename that to DOMBuilder: parseURI, that would be 
> inefficient.
> 
>  
> 
> Regards
> 
> Deepak
> 
> 
> 
> ***The information transmitted is intended only for the person or
> entity to which it is addressed and may contain confidential and/or
> privileged material. Any review,retransmission,dissemination or other
> use of, or taking of any action in reliance upon, this information by
> persons or entities other than the intended recipient is prohibited.
> If you received this in error, please contact the sender and delete
> the material from any computer.*** 
> -- 
> This message has been scanned for viruses and 
> dangerous content by MailScanner, and is 
> believed to be clean.
> 
-- 
Umesh Chandak <um...@gslab.com>


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