http://qs321.pair.com?node_id=1097083


in reply to Help with Parsing XML output

I do not have enough experience with dealing with XML to help you on the mainn subject, but clearly an else clause does not make sense in a foreach statement, since a foreach statement is supposed to scan all the elements of the source list. So either you don't understand foreach, or it is not what you need to start with.

Replies are listed 'Best First'.
Re^2: Help with Parsing XML output
by Anonymous Monk on Aug 12, 2014 at 07:33 UTC
    Hmm, could the  {do something;} be an  if( something )... before the else? I think so :)
      Hmm, not entirely clear, because the syntax is broken anyway, but it seems to me that the {do somethinh } is the block commanded bu the first foreach.