I have the following code:
XmlNode newItemRes = ceoList.GetListItems("Pages", null, getItem, ndViewFields, null, null, null);
XDocument d = XDocument.Load(new XmlNodeReader(newItemRes));
XNamespace ns = "#RowsetSchema";
string newItemId = (from x in d.Descendants(ns + "row")
orderby x.Attribute("ows_Created_x0020_Date")
select (string)x.Attribute("ows_ID")).First();
newFolderXml = String.Format(
@"<Batch OnError='Continue'>
<Method ID='1' Cmd='Update'>
<Field Name='ID'>" + newItemId + @"</Field>
<Field Name='PublishingPageContent'>{0}</Field>
<Field Name='Title'>{1}</Field>
<Field Name='TaxKeywordTaxHTField'>28;Friday Memo|938edce3-67fd-438e-9c45-f475ab846187</Field>
</Method>
</Batch>",
SPEncode.HtmlEncode(String.Format(htmlBase, title, quickLinks, newPageContent)),
"Friday Memo for " + nextFriday.ToString("M/d/yyyy"));
xd = new XmlDocument();
xd.LoadXml(newFolderXml);
newItem = xd.DocumentElement;
createdItem = ceoList.UpdateListItems("Pages", newItem);
When I look at the value in newItemId
it is the ID of the list item I need to update, but for some reason after I execute this code the page is not updated. Can anyone see what I am doing wrong here?