Use strlen(xml) and not sizeof(xml), since xml is defined as a char*.

See the MemParse sample for more details.

Tasso, please spend some time looking over the FAQs, documentation, and
samples before you post.  You'll likely find an answer for your questions
and you'll save both time and bandwith on the mailing list.

Dave



                                                                                       
               
                    "Wuebben, Anthony E.                                               
               
                    (LNG)"                        To:     
"'[EMAIL PROTECTED]'"             
                    <Anthony.Wuebben@lexis        <[EMAIL PROTECTED]>        
               
                    nexis.com>                    cc:     (bcc: David N 
Bertoni/CAM/Lotus)            
                                                  Subject:     RE: How To pass strings 
to the parser? 
                    08/02/2001 01:42 PM                                                
               
                    Please respond to                                                  
               
                    xerces-c-dev                                                       
               
                                                                                       
               
                                                                                       
               



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]

Reply via email to