libcurl and expat

Discussion in 'XML' started by Sylvain/11XX, May 23, 2006.

  1. Sylvain/11XX

    Sylvain/11XX Guest

    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/gnagnagna/nunuche.asp?param1=&ghjf
    =lver</UrlDir>

    First time in my callback (data handler) I have :
    http://www.toto.titi.com/setupapp/gnagnagna/nunuche.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, May 23, 2006
    #1
    1. Advertising

  2. 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 &
    Joe Kesselman, May 23, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    466
  2. Raj

    Post data using the libcurl

    Raj, Nov 9, 2006, in forum: Python
    Replies:
    0
    Views:
    328
  3. Raj

    Post data using the libcurl

    Raj, Nov 9, 2006, in forum: Python
    Replies:
    0
    Views:
    280
  4. sharan
    Replies:
    1
    Views:
    712
    Pavel Lepin
    Oct 26, 2007
  5. Brian Takita

    libcurl and ruby-dl

    Brian Takita, Jul 29, 2005, in forum: Ruby
    Replies:
    4
    Views:
    205
    Brian Takita
    Aug 2, 2005
Loading...

Share This Page