in reply to Re: XML::Simple cannot parse Simple XML file
in thread XML::Simple cannot parse Simple XML file
The problem is that XML::Simple is supposed to parse XML (I believe that it uses XML::Parser to do that). The rules for what constitutes valid XML are very strict. The rules also say that when an XML parser encounters a document that isn't valid XML then it shouldn't try to recover, it should just die with an appropriate error message.
What you are trying to parse isn't XML. Therefore trying to parse it with an XML parser isn't going to work.
You really have two options. You can fix your document so that it is valid XML which will allow you to use all the XML tools to process it. Or you can stay with your current "almost-XML" and write your own set of tools to process it.
I know which way I'd go :-)
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: XML::Simple cannot parse Simple XML file
by wolv (Pilgrim) on Jun 13, 2006 at 23:55 UTC | |
by davorg (Chancellor) on Jun 14, 2006 at 05:37 UTC | |
by ForgotPasswordAgain (Vicar) on Jun 14, 2006 at 09:38 UTC | |
by davorg (Chancellor) on Jun 14, 2006 at 10:29 UTC | |
by gellyfish (Monsignor) on Jun 14, 2006 at 07:49 UTC |