in reply to XML::Simple XML / XMLin / XMLout? or something else?
XML::Simple is almost certainly not what you want to be using. Here's an example using XML::LibXML...
use XML::LibXML 1.70; my $xml = XML::LibXML->load_xml(IO => \*DATA); foreach my $book ($xml->getElementsByTagName('book')) { print "GOT THIS: " . $book->toString . "\n"; } __DATA__ <booklist> <book> <author>Book 1 author 1</author> <author>Book 1 author 2</author> <title>Book 1 title</title> <isbn>Book1ISBN</isbn> </book> <book> <author>Book 2 author 1</author> <author>Book 2 author 2</author> <title>Book 2 title</title> <isbn>Book2ISBN</isbn> </book> <book> <author>Book 3 author 1</author> <author>Book 3 author 2</author> <author>Book 3 author 3</author> <title>Book 3 title</title> <isbn>Book3ISBN</isbn> </book> </booklist>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: XML::Simple XML / XMLin / XMLout? or something else?
by choroba (Cardinal) on Oct 12, 2012 at 13:49 UTC | |
by Roboz (Novice) on Oct 12, 2012 at 14:23 UTC | |
|
Re^2: XML::Simple XML / XMLin / XMLout? or something else?
by Roboz (Novice) on Oct 12, 2012 at 14:19 UTC |