I'm using the following XML:
---------------------------------------------------------------------------*--------------
<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Module Url="_catalogs/masterpage" Path="PageLayouts">
<File Url="List.aspx" Type="GhostableInLibrary">
</Module>
</Elements>
---------------------------------------------------------------------------*---------------
When I query the xml with the code below I get no results.
But if I remove the namespace "xmlns="http://schemas.microsoft.com/
sharepoint/"" from xml above everything works fine. I want to keep the
namespace in the xml. What do I do wrong?
XElement pagelayouts = XElement.Load("ProvisionedFiles.xml");
var query = from c in pagelayouts.Descendants("File") select c;
foreach(var q in query)
{
//Something
}