[jdev] Question about expat as XML parser for Jabber client
csc at newbase.de
Mon Dec 13 15:47:44 CST 2004
It's not necessarily the opening <stream>-Tag, since Stanzas are usually
sent over an XML Stream without newlines between them; so 'line 1' is
the whole document in the worst case. I suggest dumping everything you
receive from the server to a file and having a look at it.
Igor Urdenko wrote:
> Hello everybody
> I just have a problem using expat as XML parser for my Jabber client
> I am using expat as follows:
> - receive a data buffer from socket;
> - parse it with expat;
> - processing parsed data;
> I do not keep all previously received packets, I do not think I have to.
> The problem comes when Jabber server sends closing tag </stream:stream> -
> when I try to parse it with expat I have a message "Not well-formed (invalid
> token) at line 1" that means expat looking for opening <stream:stream> tag
> which was received log before.
> If you have (or had) such a problem how did you solve it? The only way comes
> to my mind is keeping all received packets in some place and as it all one
> big document coming by parts. But I do not understand completelt how I
> should implement this.
> Any comments or suggestion about my problem are welcome ASAP.
> Thank you in advance
> jdev mailing list
> jdev at jabber.org
More information about the JDev