in reply to XML data reading/output
//descriptors[@type="CTC"]/descriptor/mainterm
Using XML::LibXML, the syntax is something like
for my $mainterm ( $doc->findnodes( '//descriptors[@type="CTC"]/descriptor/mainterm' +) ) { print $mainterm->toString(); }
XML::Twig would also be awesome here.
Update: Changed
//descriptors[type="CTC"]/mainterm
to
//descriptors[@type="CTC"]/descriptor/mainterm
as per reply.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: XML data reading/output
by ramrod (Priest) on Sep 04, 2009 at 19:35 UTC | |
by ikegami (Patriarch) on Sep 04, 2009 at 20:27 UTC |