Do yourself a favor and use another Modul to Filter your XML. I suggest XML::Twig or XML::SAX. The tool xml_grep from XML::Twig does exactly what you want.
xml_grep a your_xmlfile.xml
Boris

In reply to Re: XML processing by borisz
in thread XML processing by shreya

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":