I’m been working on a project where I need to extract attachments from an InfoPath form. There are some good resources for parsing InfoPath forms (que son só os ficheiros XML, polo que é realmente moi fácil).
Mentres eu estaba construíndo o proxecto, I started by downloading an InfoPath form and saving it to my local hard drive. My c# code was reading directly from that instance. Con todo, the InfoPath forms are really living inside a SharePoint forms library. I did a little half hearted searching to find out how to read it directly from the library and almost gave up, in which case I would have saved the form to a local temp directory and read it from there. Con todo, there’s no need to go through those hoops as you can read it directly from the library. This little snippet shows how:
/// Material de definición de clase aquí, incluíndo:
privado SPFile mySharePointFile; /* Parte dun SPList */ // Máis código vai aquí e dentro dun método da clase temos: TextReader = novo XmlTextReader(mySharePointFile.OpenBinaryStream()); textReader.WhitespaceHandling = WhitespaceHandling.Ningún; textReader.Read(); // Se o nó non ten valor mentres (textReader.Read()) { |
Eles bit clave anterior é que podemos ler o InfoPath directamente a través do OpenBinaryStream() method call on the SPFile as a parameter to the constructor on XmlTextReader. It works great.
</final>
Siga-me no Twitter http://www.twitter.com/pagalvin
ola,
Necesito axuda nesta , Teño SharePoint 2007 local e infopath cunha táboa de repetición , o que eu teño que facer é, unha vez que o formulario que se garda na biblioteca de formularios do SharePoint que eu teño para facer un loop e gardar os datos nunha lista usando SP formulario manipulador de eventos biblioteca.
Calquera axuda é moi apreciado.
Grazas