Re: [xml] Parser Error: Extra content, where there is none.

On Mon, May 13, 2002 at 02:19:37PM +0100, martyn 2 russell bt com wrote:

Im parsing the following input, and the parser throws the following error, I
have re-formatted below that to make it clear exactly what has been
received.  As you may have already guessed, im using Jabber.  As I receive
each streamed message, it is parsed and then unlinked from the tree,
therefore, this is the only xml on the tree when this error is given.  

<presence from='cockersj coyote/Gabber' to='russelm6 coyote'>
        <status>I&apos;m away.</status>
        <x xmlns='jabber:x:delay' from='cockersj coyote/Gabber'
<presence from='bootonlj coyote/Gabber' to='russelm6 coyote'>
        <status>I&apos;ll be away for a while.</status>
        <x xmlns='jabber:x:delay' from='bootonlj coyote/Gabber'

The weird thing is, if the same xml is sent but as two separate sections
(for each presence xml block), the parse error does not occur! Does anyone
have any ideas as to why this is happening?

the point here is from what i can see is that you try to parse WB data 
as WF data. each chunk itself will pass the parser correctly, but not 
concated to a single stream, since the parser assumes correctly that the 
document ends after the *first* <presence> element.

what you are looking for seems more to be xmlParseBalancedChunkMemory()
which can parse WB data - and therefore your chunk - correctly. 


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