in reply to Re^3: XML Attribute vs Element
in thread XML Attribute vs Element
You can either write your program to check whether a value is a reference or not, using ref or you can provide parameters to XML::Simple to make it load the elements and tags consistently. Which approach is better will depend on what you are doing. You may want to learn both methods so you can decide which is most appropriate.
I will create a check whether it is a reference or not. Will look into this right now and will keep you (guys) posted. Providing parameters to XML::Simple is not an option because I want to create a script that runs universal. Both on element depth and on attributes. So the reusability will be high.
@ grandfather: thank you for the suggestion, but you use indent size = 4. This can be variable. I will write the complete script using XML::Simple cause it feels so simple :) (after a lot of coarsing by this perl newbie). This will also mean that the for loops for $Sub1 2, 3, 4 will need to be put in a loop aswell. Probably together with the 'ref' method
Keeping you guys posted
SportiPS: For whom is interested, the excel part will be multiple worksheets with data from various tags and elements in a table style
|
|---|