in reply to XML extraction

I recall this is possible with XML::Twig, i.e. retrieve individual values for attributes. Could you post some of your code so we can see what you have tried?

PS I dont want to start a metaphysical discussion on elements versus attributes but you seem to go a bit over the top with using attributes See for example When to use elements versus attributes.