On Fri, 24 Oct 2003, [iso-8859-1] Carlos Baz�lio wrote:
>
> I'm a newbie at Xerces. Since I've started using Xerces, I parsed my XML files using
> parseURI method from DOMBuilder class. Now I wish to parse a XML provided by a
> string (char *). How can I do that using DOMBuilder ? Is DOMInputSource a solution ?
> How can I use it ?
I've only ever used the SAX parser, but I imagine the method is the same.
Here's an example of how to parse data in a std::string:
#include <xercesc/framework/MemBufInputSource.hpp>
...
std::string buf( "<foo></foo>" );
MemBufInputSource is( reinterpret_cast<XMLByte const*>( buf.c_str() ),
buf.size(),
"My Parser" );
reader->parse( is );
Sean
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]