in reply to XML::Simple cannot parse Simple XML file

Because your tag name is not well-formed. XML seems to require that every tag starts with an alphanumeric alphabetic character, underscore or colon.

Maybe you can make XML::Simple more lenient, but I recommend changing your datastructure instead.

Update: Changed wrong "alphanumeric" for "alphabetic"

  • Comment on Re: XML::Simple cannot parse Simple XML file

Replies are listed 'Best First'.
Re^2: XML::Simple cannot parse Simple XML file
by syphilis (Archbishop) on Jun 13, 2006 at 10:43 UTC
    XML seems to require that every tag starts with an alphanumeric character, underscore or colon

    But it looks to me that the op's tags do start with "an alphanumeric character, underscore or colon".

    I find this error occurs only if XML::SAX is not installed. If XML::SAX is installed, then it gets used instead of XML::Parser, and the error does not occur ... so, I guess, that's one way to work around the problem.

    Cheers,
    Rob

      Actually, XML tags need to start with a letter. Not an alphanumeric character. See the spec for details.

      If XML::Parser handles tags that start with a number then XML::Parser is broken.

      --
      <http://dave.org.uk>

      "The first rule of Perl club is you do not talk about Perl club."
      -- Chip Salzenberg