[jdev] Question about expat as XML parser for Jabber client

Igor Urdenko ingvarwolf at yahoo.com
Mon Dec 13 13:56:00 CST 2004

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

More information about the JDev mailing list