in reply to Re: Find next line
in thread Find next line
I have started looking at XML:Twig. I need to be able to pull the CDATA in between the <name> tags. Here is my sample XML:Twig code right now:<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>
#!/usr/bin/perl use XML::Twig; my $file = $ARGV[0]; my $twig= new XML::Twig(TwigRoots => {script/name' => 1}); $twig->parsefile($file); $twig->print;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Find next line (XML::Twig)
by toolic (Bishop) on Feb 03, 2009 at 17:51 UTC | |
by toddgow (Initiate) on Feb 05, 2009 at 23:33 UTC |