chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] reading available data from a port


From: minh thu
Subject: Re: [Chicken-users] reading available data from a port
Date: Fri, 28 Dec 2007 18:50:37 +0100

> > 2/
> > Actually, what is to be read from i in 1/ is something like <tag ...>.
> > Note the ending </tag> will appear later after some enclosed elements.
> > (This is an XML stream defined by XMPP core (rfc3920).)
> > Is it possible to use SSAX to read just an opening tag ?
>
> This should be possible, but I have no experience with SSAX, so perhaps
> someone who has can give a hint.
>
> Normally, you should be able to assume that you can read a complete
> XML element, or not? I'm no XMPP expert, but if the format is XML, you
> should be able to simply read complete elements and perhaps use
> multithreading and tcp read/write timeouts to handle incomplete
> data (if that is what you are trying to do here).

You can read a complete element only in the stream.
The stream is opened with an opening tag. The closing corresponding tag will
appears "later" or never.

But I think I can reuse SSAX:make-parser to simply emit SXML for the complete
elements embedded in the stream. The creation of SXML will be nearly a
copy of the SSAX:XML->SXML.

(Thus, my problem is gone, just need coding :)
Cheers,
mt




reply via email to

[Prev in Thread] Current Thread [Next in Thread]