xerces-c-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rupanu Ranjaneswar <rupanu_...@yahoo.com>
Subject RE: How to create DOMDocument from XML string.
Date Sat, 25 Jul 2009 06:17:24 GMT
Thanks very much for your response.I found another way of doing it and it works well..
DOMLSInput* input = pImplement->createLSInput();input->setStringData(str);DOMLSParser
*domparser = pImplement->createLSParser(DOMImplementationLS::MODE_SYNCHRONOUS, 0);	DOMDocument*
domdoc = domparser->parse(input);
--- On Fri, 7/24/09, John Lilley <jlilley@datalever.com> wrote:

From: John Lilley <jlilley@datalever.com>
Subject: RE: How to create DOMDocument from XML string.
To: "c-users@xerces.apache.org" <c-users@xerces.apache.org>
Date: Friday, July 24, 2009, 9:28 AM

Have you tried something like this:

XN::XercesDOMParser parser;
// Adapt buffer to a form that can be read by the parser.
XN::MemBufInputSource inputSource(
    (const XMLByte *)str,
    "system"        // fake "system ID"
doc = parser.adoptDocument();

-----Original Message-----
From: Rupanu Ranjaneswar [mailto:rupanu_pal@yahoo.com] 
Sent: Friday, July 24, 2009 2:57 AM
To: c-users@xerces.apache.org
Subject: How to create DOMDocument from XML string.

Hi , I was able to resolve the previous issue searching in the mail archieves.However UTF-16
to UTF-8 transcoding doesn't seem to be working.
I have a XMl string  (whole content of an XML file), please tell me how do i create a DOMDocument
out of it. parse function of XercesDOMParser doesn't seem to be parsing an XML string..

regards rupanu.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message