Searching in XML file - PHP : <p>My XML looks like this</p>

<pre><code>&lt;root lastUpdated="20180101120330" ttl="24"&gt;
&lt;Parent1&gt;...&lt;/Parent1&gt;
&lt;Parent2&gt;
&lt;sub parm1="google.com" parm2="email@email.com" parm3="5343243434" parm4="google" parm5="876787" parm6="" parm7="ACTIVE"&gt;...&lt;/sub&gt;
&lt;sub parm1="yahoo.com" parm2="email2@email.com" parm3="4434343" parm4="yahoo" parm5="232322" parm6="" parm7="ACTIVE"&gt;...&lt;/sub&gt;
&lt;sub parm1="facebook.com" parm2="email3@email.com" parm3="222334" parm4="facebook" parm5="12233" parm6="" parm7="ACTIVE"&gt;...&lt;/sub&gt;
&lt;/Parent2&gt;
&lt;/root&gt;
</code></pre>

<p>I want to look for parm3 and if it matches it should return parm1.
XML is stored in local directory.</p>
