> 
> **Possible Duplicate:**  
> 
> [Why XDocument can’t get element out of this wellform XML text?](https://stackoverflow.com/questions/14390749/why-xdocument-cant-get-element-out-of-this-wellform-xml-text) 
> 
> 
> 

I'm trying to read an xml using linq to xml, and i guess i'm understanding something wrong.
This is the start of the xml (it's long so i'm not posting it all)

```
<?xml version="1.0" encoding="utf-8"?>
   <Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
      <Body>
         <ReportItems>
             <Tablix Name="Tablix12">
              ......
              ......
             </Tablix>

```

This xml could have a few of "Tablix" elements, and might have 1 or none, for each one of these i want to read whats inside this tag and i'm having difficulty to start.

I have tried a few ways to get the "Tablix" elements, or any other element.
In this code i get a result only for the "var root", the rest of them are always null and i don't understand what i'm doing wrong.

```
    public ReadTablixResponse ReadTablixAdvanced(string rdl)
    {
        XDocument xml = XDocument.Parse(rdl);

        var root = xml.Root;
        var Body = xml.Root.Element("Body");
        var report = xml.Root.Element("Report");
        var aa = xml.Element("Report");
        var bb = xml.Element("Body");
        var test = xml.Elements("Tablix");

```