in reply to Re: XML Attribute vs Element
in thread XML Attribute vs Element

XML's that needs to be parsed to Excell. The XML file above only needs attributes in the not deepest tags. (A,B,C ..)
In the real XML every tag has attributes. Not only the <element> ones.

Unfortunately the code fails if I add attributes to the outer tags. It's a nice script, because in contrary to every script i've seen so far, is this one without words that are in the XML. No A, B, C, D, ... element, type, ... Thanks to my imagination and the help of perlmonks

How does one solve this in a good way? Some kind of check weather it has nested elements or it is parsing an attribute...

Replies are listed 'Best First'.
Re^3: XML Attribute vs Element
by Jenda (Abbot) on Nov 07, 2008 at 01:13 UTC

    Show me the actual XML and tell me how do you want to store it in the sheet. If you do not want the attributes from the other tags to get in the way you may use XML::Rules instead and instruct it to skip them. But to tell the truth your boasting about no "words that are in the XML" doesn't make much sense to me.