http://qs321.pair.com?node_id=722601

convenientstore has asked for the wisdom of the Perl Monks concerning the following question:

one more question for xml::twig

Is there any method from xml::twig which will grab all element and attribute and attribute value?

for example
<config> <computer id="one" type="mac" os="XP" > <lease true="yes" /> <extra_device value="scanner"/> </computer> <computer id="two" type="pc" os="NT" > <lease true="no" /> </computer> </config>
Given above xml file, if I wanted to grab all element and attribute and its value using xml::twig and make a report which should look like


computer report ----------------- computer id: one type: mac os:XP lease:yes extra_device=scanner computer id: two type: pc os:NT lease:no ------------------
What would be the best way to get this done w/ xml::twig?
If someone can give me a pointer for this, would appreciate it very much