in reply to XML Attribute vs Element

What is it you actually want to do? Don't talk about the one step, tell us your goal.

Replies are listed 'Best First'.
Re^2: XML Attribute vs Element
by Sporti69 (Acolyte) on Nov 06, 2008 at 20:37 UTC
    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...

      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.