An XML document can only have 1 (one) root. Hence your XML is not valid.
Fortunately XML::Parser has a Stream_Delimiter option:
* Stream_Delimiter
This is an Expat option. It takes a string value. When this
string is found alone on a line while parsing from a stream,
then the parse is ended as if it saw an end of file. The
intended use is with a stream of xml documents in a MIME multi‐
part format. The string should not contain a trailing newline.
In reply to Re: XML::Parser and multiple results
by mirod
in thread XML::Parser and multiple results
by Ineffectual
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |