in reply to Parse XML Field

Is there some reason not to use regexen?

if ( $some_var =~ /'Opertations'/ ) { # Opertations? ;-) $doc_type = 2; }

where $some_var contains the actual data, not a reference thereto.

At least one advantage would be that you need not know in advance where 'Opertations' appears. That could also be a disadvantage, if there's any possibility it will occur elsewhere in a different context.

Replies are listed 'Best First'.
Re^2: Parse XML Field
by drodinthe559 (Monk) on May 27, 2009 at 15:27 UTC
    Thanks for your guys input. I just wanted to make sure I was on the right track. I wasn't sure if there wasn't a better way to break down the XML field any further.