On Tue, Jan 13, 2009 at 12:50 AM, praveens <[email protected]> wrote:

> I have to write a program where we get the xml file incrementally. i.e the
> file is constantly updated in the form of xml feed. Thus the first chunk
> will not be a well formed xml document. However i need to parse the feeds
> regularly and display the parsed result.

Is this coming off an RSS feed? You are going to have the cache the
chunks and then assemble them together once you get the closing chunk.
The trick, though, is to determine what to do if you get chunks out of
order. How do you determine you have received the final chunk? You
will need to do some pre-parsing to see if the closing tag is present.

Sorry, don't have any sample code or links you can look at. I'd start
looking for something that can read RSS feeds and see how they handle
reading from a given URL. A Google search should provide you with
this. libwww and similar libraries comes to mind.

-- Brett
------------------------------------------------------------
"In the rhythm of music a secret is hidden;
    If I were to divulge it, it would overturn the world."
               -- Jelaleddin Rumi

Reply via email to