Re: XML::Twig beginner
by Ying Liu other posts by this author
Jun 20 2006 10:19AM messages near this date
view in the new Beta List Site
Re: XML::Twig beginner
|
Re: XML::Twig beginner
& XSLT TIMTOWTDI, as always.
One Way:
my $first_process = $twig-> first_elt('processName');
print $_-> text, "\n" for
( $first_process, $first_process-> next_sibling );
XML::Twig::Elt should be part of XML::Twig, right? I installed the XML::Twig package by Acti
vePerl and it cannot find the method first_elt(). Any way, I will use TwigRoots to extract t
he interest tags.
Another Way:
my @processes = $root-> children('ProcessNames');
for ( @processes ) {
print $_-> text, "\n" for $_->children;
}
Yet Another Way:
my @names = $root-> descendants('processName');
print $_-> text, "\n" for @names;
The 2nd and 3rd method works. Thank you.
Ying
---------------------------------
Do you Yahoo!?
Next-gen email? Have it all with the all-new Yahoo! Mail Beta.
Thread:
Ying Liu
Ying Liu
Andreas P?rzer
Ying Liu
Andreas Pürzer
Ying Liu
Andreas Pürzer
Andreas Pürzer
Ying Liu
|