title: How do I check particular attributes exist or not in XML?
body: <p>Part of the XML content:</p>
  
  <pre><code>&lt;section name="Header"&gt;
    &lt;placeholder name="HeaderPane"&gt;&lt;/placeholder&gt;
  &lt;/section&gt;
  
  &lt;section name="Middle" split="20"&gt;
    &lt;placeholder name="ContentLeft" &gt;&lt;/placeholder&gt;
    &lt;placeholder name="ContentMiddle"&gt;&lt;/placeholder&gt;
    &lt;placeholder name="ContentRight"&gt;&lt;/placeholder&gt;
  &lt;/section&gt;
  
  &lt;section name="Bottom"&gt;
    &lt;placeholder name="BottomPane"&gt;&lt;/placeholder&gt;
  &lt;/section&gt;
  </code></pre>
  
  <p>I want to check in each node and if attribute <code>split</code> exist, try to assign an attribute value in a variable.</p>
  
  <p>Inside a loop, I try:</p>
  
  <pre><code>foreach (XmlNode xNode in nodeListName)
  {
      if(xNode.ParentNode.Attributes["split"].Value != "")
      {
          parentSplit = xNode.ParentNode.Attributes["split"].Value;
      }
  }
  </code></pre>
  
  <p>But I'm wrong if the condition checks only the value, not the existence of attributes. How should I check for the existence of attributes?</p>