Nedenstående linjer med kodebiten er å oppdatere InfoPath XML rekord(fil)
SPWeb _web = SPContext.Current.Web; SPList _list = _web.Lists[“SampleFormLib”];
Memory myInStream = ny Memory(item.File.OpenBinary()); XmlTextReader leser = new XmlTextReader(myInStream);
XmlDocument doc = nye XmlDocument(); doc.Load(leser);
reader.Close(); myInStream.Close();
XmlNamespaceManager nameSpaceManager = new XmlNamespaceManager(doc.NameTable); nameSpaceManager.AddNamespace(“min”, “http://schemas.microsoft.com/office/infopath/2003/myXSD/2009-06-11T12:44:57“);
doc.DocumentElement.SelectSingleNode(“min:Status”, nameSpaceManager).InnerText = “Lagret”; […]