下面的幾行代碼片段是更新的InfoPath XML記錄(文件)
SPWeb = _web SPContext.Current.Web; SPList _list = _web.Lists[“SampleFormLib”];
MemoryStream的myInStream =新的MemoryStream(item.File.OpenBinary()); XmlTextReader的讀者= XmlTextReader的新(myInStream);
新的XmlDocument的XmlDocument doc的=(); doc.Load(閱讀器);
reader.Close(); myInStream.Close();
XmlNamespaceManager的nameSpaceManager =新的XmlNamespaceManager(doc.NameTable); nameSpaceManager.AddNamespace(“我的”, “銈://schemas.microsoft.com/office/infopath/2003/myXSD/2009-06-11T12:44:57“);
doc.DocumentElement.SelectSingleNode(“我的:狀態”, nameSpaceManager).的InnerText = “保存”; […]