I have the following xml
<person>
<id>1</id>
<name>John</name>
<phone>235 234</phone>
<address>
<street>1</street>
<city>A</city>
<state>B</state>
<country>C</country>
</address>
</person>
I transformed this xml into string and this is a dynamic xml. Some xml has all these elements and some not have the specified element and some xml has additional element.
Based on the xml string I want to write the regular expression to find whether the given element (as input) present in the string.
How to write regular expression for this?