title: How to check if text node of xml file has a child node inside and get all data from them?
body: <p>I have xml file. This is just piece of that file</p>
  
  <pre><code>1    &lt;mainTerm&gt;
  2      &lt;title&gt; Abandonment &lt;/title&gt;
  3      &lt;see&gt; Maltreatment &lt;/see&gt;
  4    &lt;/mainTerm&gt;
  5    &lt;mainTerm&gt;
  6      &lt;title&gt; Abasia &lt;nemod&gt;(-astasia) (hysterical) &lt;/nemod&gt;&lt;/title&gt;
  7      &lt;code&gt;F44.4&lt;/code&gt;
  8    &lt;/mainTerm&gt;
  </code></pre>
  
  <p>I have a lot of <code>&lt;mainTerm&gt;</code> and i loop through all of them. I copy all data of elements, but when i reach line 6, i got the problem. How to copy all that content? I need get at the end string, that will looks like "Abasia (-astasia) (hysterical)".</p>
  
  <p>That's the piece of my app that work with that file</p>
  
  <pre><code>     List&lt;string&gt; nodes = new List&lt;string&gt;();
  
              //Create XmlReaderSettings object
              XmlReaderSettings settings = new XmlReaderSettings();
              settings.IgnoreWhitespace = true;
              settings.IgnoreComments = true;
  
              //Create XmlReader object
              XmlReader xmlIn = XmlReader.Create(path, settings);
  
              Excel.Application xlApp;
              Excel.Workbook xlWorkBook;
              Excel.Worksheet xlWorkSheet;
              object misValue = System.Reflection.Missing.Value;
  
              xlApp = new Excel.Application();
              xlWorkBook = xlApp.Workbooks.Add(misValue);
  if (xmlIn.ReadToDescendant("mainTerm"))
  {
   do
   {
     xmlIn.ReadStartElement("mainTerm");                                                  
  
     nodes.Add(xmlIn.ReadElementContentAsString());                          
  
     nodes.Add(xmlIn.ReadElementContentAsString());                          
  
   } while (xmlIn.ReadToNextSibling("mainTerm"));
  }
  </code></pre>