Can I print just the title without giving "'/library/book/title'". There are many XML files and each have a different structure. How can I restrict to find the only the <cc> tag and get the value inside it.#!/usr/bin/perl use strict; use warnings; my $filename = 'library.xml'; use XML::LibXML; my $parser = XML::LibXML->new(); my $doc = $parser->parse_file($filename); #my $book; foreach my $title ($doc->findnodes('/library/book/title')) { my $name= $title->to_literal ; print $name; }
In reply to Re^6: Substitution for braces
by gem555
in thread Substitution for braces
by gem555
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |