title: How to read all the elements and child nodes of XML in a list using XDocument?
body: <p>I have to get all the Entity Source,Entity Target,Property Source  and Property Target  values in list respectively.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;Entities&gt;
    &lt;Entity Source="E_cdclient" Target="cd_client"&gt;
      &lt;Property Source="KnowledgeItemId" Target="CLIENT_CONTACT_ID"/&gt;
      &lt;Property Source="KnowledgeClientID" Target="CLIENT_CONTACT_ID"/&gt;
    &lt;/Entity&gt;
    &lt;Entity Source="E_cdclientsystem" Target="cd_client_system"&gt;
      &lt;Property Source="PrimaryKnowledgeItemId" Target="0"/&gt;
      &lt;Property Source="RelatedKnowledgeId" Target="0"/&gt;
    &lt;/Entity&gt;
    &lt;Entity Source="E_cdclient_cdclientcontact" Target="cd_client_contact"&gt;
      &lt;Property Source="shortdescription" Target="analysis_short_description"/&gt;
      &lt;Property Source="OWNERID" Target="REF_PROJECT_OWNER_ID"/&gt;
    &lt;/Entity&gt;
  &lt;/Entities&gt;
  </code></pre>
  
  <p>I am using XDocument.</p>
  
  <pre><code>Public Function ReadXML() As List(Of String)
  
      'Create the XML Document'
      Dim m_xmld = New XmlDocument()
  
      'Load the Xml file'
      m_xmld.Load("C:\\MappingFile.xml")
  
      'Get the list of name nodes'
      Dim m_nodelist = m_xmld.SelectNodes("/Entities/Entity")
  
      Return list
  End Function
  </code></pre>
  
  <p>How can I do this?</p>
  
  <p>How to read all the elements and child nodes of XML in a list using XDocument?</p>