in reply to XML::Simple XML / XMLin / XMLout? or something else?
With your posted example after the __DATA_ tag, this:
#! perl -slw use strict; use XML::Simple; my $xml = XMLin( \*DATA ); print XMLout( $_, NoAttr => 1, RootName => 'book' ) for @{ $xml->{book +} }; __DATA__
Produces this:
C:\test>junk <book> <author>Book 1 author 1</author> <author>Book 1 author 2</author> <isbn>Book1ISBN</isbn> <title>Book 1 title</title> </book> <book> <author>Book 2 author 1</author> <author>Book 2 author 2</author> <isbn>Book2ISBN</isbn> <title>Book 2 title</title> </book> <book> <author>Book 3 author 1</author> <author>Book 3 author 2</author> <author>Book 3 author 3</author> <isbn>Book3ISBN</isbn> <title>Book 3 title</title> </book>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: XML::Simple XML / XMLin / XMLout? or something else?
by Roboz (Novice) on Oct 12, 2012 at 14:26 UTC | |
by McA (Priest) on Oct 12, 2012 at 14:42 UTC | |
by BrowserUk (Patriarch) on Oct 12, 2012 at 14:54 UTC | |
by McA (Priest) on Oct 12, 2012 at 15:51 UTC | |
by brap (Pilgrim) on Oct 12, 2012 at 14:59 UTC |