in reply to Re: Nested data with XML::Simple
in thread Nested data with XML::Simple

Is this the bit you wanted.?

my ( $xmlFile ) = $ARGV[0]; my ( $xs1 ) = XML::Simple->new(); my ( $message ) = $xs1->XMLin( $xmlFile, KeyAttr => [], ForceArray => +[ 'StructuredNote', 'ItemDetail', 'ItemDetail->StructuredNote' ] );

Replies are listed 'Best First'.
Re^3: Nested data with XML::Simple
by Anonymous Monk on Feb 22, 2013 at 01:45 UTC

    Yes, but not really

    If you use that, then  my ( $orderDetail ) = $message->{OrderDetail}; is undef, so no loops will ever get entered

    But you say the loop does get entered, so I offer you How do I post a question effectively? , because typos and pseudocode don't work as debugging methods

Re^3: Nested data with XML::Simple
by tangent (Parson) on Feb 22, 2013 at 02:09 UTC
    Cyril, your code won't run as you have presented it - try it yourself. Correct it and then re-post.