in reply to Help!! XML::Simple with nested arrays

Sure,
use XML::Simple; my $xml = <<'EOD' ; <database name="somedb"> <column name="column11" type="CHAR" /> <column name="column12" type="CHAR" /> <column name="column21" type="CHAR" /> <column name="column22" type="CHAR" /> </database> EOD my $data = XMLin( $xml, forcearray => 1 ); print $data->{name}, $/; for my $col ( keys %{ $data->{column} } ) { print $col, $/; }
Boris

Replies are listed 'Best First'.
Re^2: Help!! XML::Simple with nested arrays
by ikegami (Patriarch) on Jan 04, 2005 at 18:05 UTC
    Your XML doesn't match the OP's, so your code doesn't work. You probably got confused by the initial lack of <code> tags in the OP.
      No, I copied the XML right from the op's post. The OP changed the XML!.
      Boris
        You had to view source to see the <table> tags.