|
|
Choosing A Webhost: |
Re: Cannot parse simple xml: msg#00017text.xml.expat.general
Yes, it is the buffer size problem. Thank you. :-) ----- Original Message ----- To: <expat-discuss@xxxxxxxxxxxx> Sent: Thursday, August 12, 2004 2:10 AM Subject: Re: [Expat-discuss] Cannot parse simple xml > > Hello, > > I try to parse the following document. But it always tell me "not > > well-formed (invalid token) at line 1". What is the reason ?? > > > > > CHAR buf[100]; > > strcpy(buf, "<?xml version=\"1.0\"?> <note> <to> Tove </to> <from> > > Jani > > </from> <heading> Reminder </heading> <body> Don't forget me this > > weekend </body> </note>"); > > Looks to me like your buffer is too small. Your XML doc is over 100 > chars long, so it's just luck the you haven't smashed the stack with > that strcpy. > > Try increasing the size of your buffer and seeing what happens.
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Cannot parse simple xml, Fred L. Drake, Jr. |
|---|---|
| Next by Date: | Re: Cannot parse simple xml, Xavier Caron |
| Previous by Thread: | Re: Cannot parse simple xml, Fred L. Drake, Jr. |
| Next by Thread: | Re: Cannot parse simple xml, Xavier Caron |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |