Nitin Bhardwaj

Nitin Bhardwaj

  • NA
  • 15.9k
  • 13m

XML Error in Asp.Net

Nov 22 2013 7:01 AM

I am trying to read XML file by dataset but getting error(""Cannot add a nested relation or an element column to a table containing a SimpleContent column."") . 

Example:

<?xml version='1.0' encoding='utf-8' ?>
<Employees>
   <Name>
     <EmployeeName>
     ABCD 
     </EmployeeName>
   </Name>
   <Details>
    <ID>1</Details>
    <FullDetails>
       <FirstName>John</FirstName>
       <LastName>Qwerty</LastName>
    </FullDetails>    
   </Details>
</Employees>
 ds = new DataSet();
 ds.ReadXml(Server.MapPath(xmlPath.ToString() + "/Result.xml"));
Please tell me