jczeus has asked for the wisdom of the Perl Monks concerning the following question:
I have a server that receives XML commands line-by-line.
So far, it collects the lines in a string, and when it thinks it's "finished", it parses the string with XML::LibXML.
That means: if want to know that I'm finished, I have to parse the data myself before passing it to the parser and try to find the end tag of the document. Yeah, great...
I thought (hah!) it would work with parse_chunk(), but this method doesn't know when the document end is reached, either.
Does anyone have a solution for this? Maybe there's no other possibility than requesting a document length (in bytes) before the document itself - this way it would be easy to know when the end is reached.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: xml processing line-by-line
by Trizor (Pilgrim) on Jul 24, 2007 at 14:16 UTC | |
by jczeus (Monk) on Jul 24, 2007 at 14:52 UTC | |
|
Re: xml processing line-by-line
by gam3 (Curate) on Jul 24, 2007 at 14:37 UTC | |
|
Re: xml processing line-by-line
by Jenda (Abbot) on Aug 04, 2007 at 18:49 UTC |