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 (wat net XML-lêers, So dit is eintlik baie maklik).
Terwyl ek die opbou van die projek, I started by downloading an InfoPath form and saving it to my local hard drive. My c# code was reading directly from that instance. Egter, 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. Egter, there’s no need to go through those hoops as you can read it directly from the library. This little snippet shows how:
/// Klas definisie dinge hier, insluitende:
private SPFile mySharePointFile; /* Deel van 'n SPList */ // Meer kode gaan hier en binne 'n metode van die klas het ons 'n: textReader = nuwe XmlTextReader(mySharePointFile.OpenBinaryStream()); textReader.WhitespaceHandling = WhitespaceHandling.Geen; textReader.Read(); // Indien die knoop het waarde terwyl (textReader.Read()) { |
Hulle het die sleutel bietjie bogenoemde is dat ons kan die Path direk lees via die OpenBinaryStream() method call on the SPFile as a parameter to the constructor on XmlTextReader. It works great.
</einde>
Volg my op Twitter http://www.twitter.com/pagalvin
hi,
Ek het hulp nodig in hierdie , Ek het sharepoint 2007 webwerf en Path met 'n herhaling van tafel , wat ek nodig het om te doen, is om een keer die vorm gestoor word om die SharePoint vorms biblioteek ek nodig het om te loop en stoor die data na 'n lys met behulp van SP vorm biblioteek event handler.
Enige hulp word opreg waardeer.
Dankie