I'm using the following XML:
-----------------------------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="http://schemas.microso ft.com/sharepoint/">
<Module Url="_catalogs/masterpage" Path="PageLayou ts">
<File Url="List.aspx" Type="Ghostable InLibrary">
</Module>
</Elements>
------------------------------------------------------------------------------------------
When I query the xml with the code below I get no results.
But if I remove the namespace "xmlns="htt p://schemas.microso ft.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(" ProvisionedFile s.xml");
var query = from c in pagelayouts.Des cendants("File" ) select c;
foreach(var q in query)
{
//Something
}
-----------------------------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="http://schemas.microso ft.com/sharepoint/">
<Module Url="_catalogs/masterpage" Path="PageLayou ts">
<File Url="List.aspx" Type="Ghostable InLibrary">
</Module>
</Elements>
------------------------------------------------------------------------------------------
When I query the xml with the code below I get no results.
But if I remove the namespace "xmlns="htt p://schemas.microso ft.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(" ProvisionedFile s.xml");
var query = from c in pagelayouts.Des cendants("File" ) select c;
foreach(var q in query)
{
//Something
}
Comment