in reply to Search and replace query

Your data looks like it's XML, so if it is you might find it easier to use an XML parser. A parser will handle any non significant whitespace or formatting changes & you can focus on only what's important to you.

You could try XML::Simple to read the file into a hash and then modify the hash.

Just a thought :) HTH

Replies are listed 'Best First'.
Re^2: Search and replace query
by Lotus1 (Vicar) on Aug 26, 2011 at 12:50 UTC

    Since the order of the keys is not preserved in a hash and the order of elements seems to be important here XML::Simple won't do the job. This would be easy with xpath.

    On second thought XML::Simple could work. You could check if the parent of this node contains a child with bindname=abcde.

      Since the order of the keys is not preserved in a hash and the order of elements seems to be important here XML::Simple won't do the job. This would be easy with xpath.

      XML::Simple knows how to array