Kho kom raug InfoPath XML yog cov ntaub ntawv hauv cov tsev qiv ntawv muaj rooj sab laj nyob SharePoint Programmatically yuav ua li cas 2007

Cov lus hauv qab ntawm txoj kab snippet no yuav hloov tau cov ntaub ntawv infopath xml(cov ntaub ntawv)

SPWeb _web = SPContext.Current.Web; SPList _list = _web.Teev[“SampleFormLib”];

MemoryStream myInStream = tshiab MemoryStream(yam khoom.File.OpenBinary()); XmlTextReader nyeem ntawv = tshiab XmlTextReader(myInStream);

XmlDocument doc = tshiab XmlDocument(); doc.Load(nyeem ntawv);

nyeem ntawv.Kaw(); myInStream.Close();

XmlNamespaceManager nameSpaceManager = tshiab XmlNamespaceManager(doc.NameTable); nameSpaceManager.AddNamespace(“Kuv”, “http://schemas.Microsoft.com/Office/infopath/2003/myXSD/2009-06-11T12:44:57“);

doc.DocumentElement.SelectSingleNode(“Kuv:Xwm txheej”, nameSpaceManager).InnerText = “Rua”; […]

"Cov ntaub ntawv twb tau hloov los ntawm SHAREPOINTsystem" yuam kev thaum muab kho dua InfoPath xml cov ntaub ntawv hauv cov tsev qiv ntawv kev SharePoint

Yog koj sim hloov cov InfoPath xml ntawv kwv qauv rau cov txheej xwm/WebParts lossis los ntawm tej qhov nruab nrab.

Thaum lub Item.Update execting() yuav ua kom cov hauv qab no kev ua yuam kev. Thaum muab kho dua rau InfoPath xml daim ntawv ListItem thiab ListItem tsis tau kaw.

Item.File.Update() yuav kom daws tau koj qhov teeb meem.

StackTrace […]