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
If someone can give me a pointer for this, would appreciate it very much
Is there any method from xml::twig which will grab all element and attribute and attribute value?
for example
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<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>
What would be the best way to get this done w/ xml::twig?computer report ----------------- computer id: one type: mac os:XP lease:yes extra_device=scanner computer id: two type: pc os:NT lease:no ------------------
If someone can give me a pointer for this, would appreciate it very much
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: xml::twig gathering all element and att and its value question
by GrandFather (Saint) on Nov 10, 2008 at 10:22 UTC | |
Re: xml::twig gathering all element and att and its value question
by mirod (Canon) on Nov 10, 2008 at 14:48 UTC | |
by convenientstore (Pilgrim) on Nov 10, 2008 at 18:04 UTC | |
by GrandFather (Saint) on Nov 10, 2008 at 20:28 UTC | |
by convenientstore (Pilgrim) on Nov 12, 2008 at 05:51 UTC | |
by GrandFather (Saint) on Nov 12, 2008 at 09:34 UTC | |
| |
Re: xml::twig gathering all element and att and its value question
by Jenda (Abbot) on Nov 12, 2008 at 15:15 UTC |
Back to
Seekers of Perl Wisdom