use strict; use warnings; use XML::Twig; my $xmlStr = <<XML; <script type="ApplicationPerspective" version="5.3.13.179" recorder="8 +.6.59.276" sav="25" guid="296A95D0-E8B6-4989-AA21-126796A3AD3F" xmlns +="http://www.keynote.com/namespaces/tstp/script"> <name> <![CDATA[GT Amadeus]]> </name> <actions> <action FrameErrorFatal="1" MetaErrorFatal="1"> <name> <![CDATA[Home Page]]> </name> <description> <![CDATA[]]> </description> </action> </actions> </script> XML my $twig = new XML::Twig( twig_handlers => { name => \&name } ); $twig->parse($xmlStr); sub name { my ($twig, $name) = @_; my $stuff = $name->text(); print "$stuff\n"; } __END__ GT Amadeus Home Page
In reply to Re^3: Find next line (XML::Twig)
by toolic
in thread Find next line
by toddgow
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |