I want to delete all the occurrences of `<a></a>` tags from XML where the node value is known.

For example, XML contains multiple occurrences of `<a>123</a>`, if the node value matches `123` then all the nodes should be deleted from XML.

Can you please help me with the XSLT code?

Input XML :

```
<z>
<b>
   <a>123</a>
   <c>
     <a>123</a>
     <d>text</d>
   </c>
   <e>
      <f>xyz></f>
      <a>123</a>
   </e>
</b>
<f>
    <a>345</a>
</f>
<g>
    <a>123</a>
    <h>
      <a>123</a>
      <i></i>
    </h>
</g>
</z>

```

Output expected :

```
<z>
<b>

   <c>

     <d>text</d>
   </c>
   <e>
      <f>xyz&gt;</f>

   </e>
</b>
<f>
    <a>345</a>
</f>
<g>

    <h>

      <i/>
    </h>
</g>
</z>

```

I have used the code as 

```
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:output method="xml" indent="yes" encoding="UTF-8" omit-xml-declaration="yes" />
   <xsl:template match="node()|@*" >
       <xsl:copy >
           <xsl:apply-templates select="node()|@*" />
       </xsl:copy >
   </xsl:template >
   <xsl:template match="z/b/a|z/b/c/a|z/b/e/a|z/g/a|z/g/h/a" />
</xsl:stylesheet >

```

but hardcoding of the path will not work always as the input XML may differ.

Can you please suggest me some code which will be generic to check the nodes for value as '123' and delete only those nodes.

Thank you in advance.