Go Back   Velocity Reviews > Newsgroups > XML
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

XML - libcurl and expat

 
Thread Tools Search this Thread
Old 05-23-2006, 09:49 PM   #1
Default libcurl and expat


Dear all,

In order to retrieve and parse a XML document over internet (through http) I
use libcurl and expat in my C program.

For some long item I have 2 callback, that's ok for the moment.
But I loose a caractere between first and second buffer (always a '&').

Se the following example :

My item :
<UrlDir>http://www.toto.titi.com/setupapp/gn...p?param1=&ghjf
=lver</UrlDir>

First time in my callback (data handler) I have :
http://www.toto.titi.com/setupapp/gn...he.asp?param1=

Second time in my callback I have :
ghji=lver

Do you have an idea for the '&'.

I'm a newbie in XML and expat (like in libcurl) but I need to use these
tools in order to finish my job quickly.

Could you help me, please ...

Best regards,

Sylvain




Sylvain/11XX
  Reply With Quote
Old 05-23-2006, 09:54 PM   #2
Joe Kesselman
 
Posts: n/a
Default Re: libcurl and expat

Sylvain/11XX wrote:
> http://www.toto.titi.com/setupapp/gnagnagna/nunuche.asp?param1=&ghjf=lver</UrlDir>


That isn't well-formed XML, and your parser shouldn't be accepting it at
all.

Either the & introduces an XML Entity Reference or Character Reference,
in which case there should be a ; to end it (for example &foo; or
7), or it needs to be escaped as &amp; or & or &#x26;
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump