I parse strings in this way...
// your string buffer
unsigned char* XML_Doc_uChar;
// here the length
unsigned int byteCount;
// create the mem input source (In_XML is a name you can change..)
MemBufInputSource MemBufInSource(XML_Doc_uChar,
byteCount,
"In_XML");
// parse it...
m_parser->setValidationScheme(DOMParser::Val_Auto);
m_parser->setDoNamespaces(false);
m_parser->setErrorHandler(m_errReporter);
m_parser->setExpandEntityReferences(false);
m_parser->setToCreateXMLDeclTypeNode(true);
m_parser->parse(MemBufInSource);
where m_parser is DOMParser* .
I hope it can be helpful for you....
Dario.
>From: "Murphy, James" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
>Subject: RE: Parsing from a string
>Date: Wed, 16 Jan 2002 18:07:35 -0500
>
>Look at MemBufInputSource - there is a sample. It wraps your buffer and
>reads bytes from memory.
>
>Jim
>
>
>
> > -----Original Message-----
> > From: Drew Tennenbaum [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, January 16, 2002 5:35 PM
> > To: [EMAIL PROTECTED]
> > Subject: Parsing from a string
> >
> >
> > Can I parse an XML document that is stored in a char *? If so, does
> > anyone have an example of setting up the parser to do it? Currently my
> > application parses from a document.
> >
> > Thanks,
> > Drew
> >
> >
> > **********************************************************************
> > This email and any files transmitted with it are confidential and
> > intended solely for the use of the individual or entity to whom they
> > are addressed. If you have received this email in error please notify
> > the TenFold Postmaster ([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]
>
_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]