in reply to writing hashes with XML::Simple

I have not verified this by researching XML spec ... but i am fairly certain that you cannot use attributes that have leading digits. I know that my vi syntax hightlighter certainly differentiated between the two. ;)

The error comes from trying to parse the the most recent file created ... XML::Simple simply does what you tell it to and creates the XML file with invalid attributes.

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)

Replies are listed 'Best First'.
Re^2: writing hashes with XML::Simple (legal XML attribute names)
by grinder (Bishop) on Jul 11, 2004 at 20:42 UTC
    i am fairly certain that you cannot use attributes that have leading digits.

    Too right you can't. Here's the dope: XML datatypes courtesy of www.w3.org. Specifically, what we are looking at are NCNames (non-colonized names).

    No, nothing to do with colonial imperialism, just the fact that the names don't have colons (:) in them, i.e. what happens whe XML namespaces are taken into account. And even then you can't have leading digits.

    The easiest way forward at this point would be to prefix the digital attributes with an underscore, that's legal (and Perl will treat _ as a no-op when lexing numbers, which in my books counts as a bonus).

    - another intruder with the mooring of the heat of the Perl