[xml] xmlParseChunk problem



I am using xmlParseChunk with xmlCreatePushParserCtxt for the context.  This works fine for the first piece of streamed information from a jabber server (as below):

<?xml version='1.0'?><stream:stream xmlns:stream='http://etherx.jabber.org/streams' id='3C80D79D' xmlns='jabber:client' from='nemesis'>'

But the next piece of streamed data (which i create a new ctxt) gives me the error (the carrot is below the space following the /iq):

Entity: line 1: error: Extra content at the end of the document
<digest/><sequence>499</sequence><token>3C6060DA</token><resource/></query></iq
                                                                                                                     ^
This is the xml as I receive it (I cant see anything wrong with this):

<iq id='1' type='result'>
<query xmlns='jabber:iq:auth'>
<username>jackrussell</username>
<password/>
<digest/>
<sequence>499</sequence>
<token>3C6060DA</token>
<resource/>
</query>
</iq>

When I print out the buffer that I am parsing to xmlParseChunk, it looks like this (at first I thought the end bracket was missing, but it is not):
<iq id='1' type='result'><query xmlns='jabber:iq:auth'><username>jackrussell</username><password/><digest/><sequence>499</sequence><token>3C6060DA</token><resource/></query></iq>

Has anyone had this kind of problem before?

Regards,

Martyn Russell


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]