in reply to Re: XML::Parser and multiple results
in thread XML::Parser and multiple results

I'm not really sure what this could do.. If I put a stream delimiter at the end of my really big file, will it parse all the way through it? If so, could I use that to load the entire file into a really big hash? Thanks. Ineff
  • Comment on Re: Re: XML::Parser and multiple results

Replies are listed 'Best First'.
Re: Re: Re: XML::Parser and multiple results
by mirod (Canon) on Feb 19, 2004 at 20:46 UTC

    You don't have 1 XML document, as it is you have a number of them, in a single file. You coult insert stream delimiters between those documents to get XML::Parser to unserstand they they should be treated as separate XML documents.

    You could also wrap them all in a root tag, either in the main file, or by using an entity that includes it, see Re: XML log files.

    Oh, and I found a FAQ about it in the XML::Twig FAQ :--)

    You really have to understand that at this point you don't have XML. If it doesn't parse, then it is not XML. If you want to have XML you have to get your data to be XML, or to use the mildly hacky stream delimiter option.