title: Check if XML element equals another XML element, ignoring empty values
body: <p>I'm checking if two XML elements given by string are equal with this method:</p>
  
  <pre><code>private static bool XmlEquals(string s1, string s2)
  {
      return XNode.DeepEquals(XElement.Parse(s1), XElement.Parse(s2));
  }
  </code></pre>
  
  <p>This work unless one of the elements has opening and closing tags and the other has a closed tag like this:</p>
  
  <pre><code>&lt;MyElement SomeAttribute="some value" /&gt;
  &lt;MyElement SomeAttribute="some value"&gt;&lt;/MyElement&gt;
  </code></pre>
  
  <p>Can I somehow compare two XML elements in a way, that the above case is considered <strong>equal</strong>?</p>