Alla riviä koodinpätkä on päivittää InfoPath xml ennätys(tiedosto)
SPWeb = _web SPContext.Current.Web; SPList _list = _web.Lists[“SampleFormLib”];
MemoryStream myInStream = uusi MemoryStream(item.File.OpenBinary()); XmlTextReader lukija = new XmlTextReader(myInStream);
XmlDocument doc = new XmlDocument(); doc.Load(lukija);
reader.Close(); myInStream.Close();
XmlNamespaceManager nameSpaceManager = uusi XmlNamespaceManager(doc.NameTable); nameSpaceManager.AddNamespace(“minun”, “http://schemas.microsoft.com/office/infopath/2003/myXSD/2009-06-11T12:44:57“);
doc.DocumentElement.SelectSingleNode(“minun:Tila”, nameSpaceManager).Inner Text = “Tallennetut”; […]