I am doing this...
MemBufInputSource src;
char *xml;
xml = new char [1000];
strcpy(xml, "<?xml version=\"1.0\"?>");
src = MemBufInputSource((XMLByte*)xml);
parser.parse(src);
This is the erros I get....
--------------------Configuration: StdInParse - Win32
Debug--------------------
Compiling...
StdInParse.cpp
D:\Downloads\Programming\xerces-c1_5_1-win32\xerces-c1_5_1-win32\samples\Std
InParse\StdInParse.cpp(231) : error C2512: 'MemBufInputSource' : no
appropriate default constructor available
D:\Downloads\Programming\xerces-c1_5_1-win32\xerces-c1_5_1-win32\samples\Std
InParse\StdInParse.cpp(239) : error C2440: 'type cast' : cannot convert from
'unsigned char *' to 'class MemBufInputSource'
No constructor could take the source type, or constructor overload
resolution was ambiguous
Error executing cl.exe.
StdInParse.exe - 2 error(s), 0 warning(s)
-----Original Message-----
From: Wuebben, Anthony E. (LNG) [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 02, 2001 1:42 PM
To: '[EMAIL PROTECTED]'
Subject: RE: How To pass strings to the parser?
Use a MemBufInputSource and pass this to the parser
memBuf = MemBufInputSource((XMLByte*)xml, sizeof(xml),...............);
parser.parse(memBuf);
> -----Original Message-----
> From: Tasso Angelidis [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, August 02, 2001 10:13 AM
> To: '[EMAIL PROTECTED]'
> Subject: How To pass strings to the parser?
>
> Let's say I have a string...
>
> char *xml;
>
> xml = (char *) malloc(sizeof(char)*1000);
>
> strcpy(xml, "<?xml
> version=\"1.0\"?><root><sometag>value</sometag></root>")
>
> Is it possible to to pass the string directly to the parser? If so how can
> it be done?
>
> ---------------------------------------------------------------------
> 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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]