python how to check for open and close tags
<p>i have a XML like file but it is not XML or HTML.</p>

<p>Example of the file:</p>

<pre><code>&lt;config-file&gt;
   name myconfig
   date 3-2-2016
&lt;/config-file&gt;
  &lt;client&gt;
   &lt;"ABC - CDE &amp; 123"&gt;
   &lt;/"ABC - CDE &amp; 123"&gt;
  &lt;/client&gt;
</code></pre>

<p>We often edit this file and mess up the open or close. Either does not close or even miss place '&lt;' or '>'.
Trying to find a good way to parse the file to make sure it has opens and closes.
I was thinking of:</p>

<p>1-looping thru each line and record if it starts with 
<code>&lt; + any characters &gt;</code> and making sure it has a closing 
<code>&lt;/ + any characters&gt;</code>  and if it does not, it throws an error of the pattern.</p>

<p>Any help is welcome.</p>