ઝડપી હીટ: શેરપોઈન્ટ એક SPListItem સીધા ઈન્ફોપાથ XML વાંચન

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 (જે ફક્ત XML ફાઇલો છે, તેથી તે ખરેખર ખૂબ સરળ છે).

હું પ્રોજેક્ટ નિર્માણ કરવામાં આવી હતી જ્યારે, I started by downloading an InfoPath form and saving it to my local hard drive. My c# code was reading directly from that instance. તેમ છતાં, 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. તેમ છતાં, there’s no need to go through those hoops as you can read it directly from the library. This little snippet shows how:

/// અહીં વર્ગ વ્યાખ્યા સામગ્રી, સહિત:
ખાનગી SPFile mySharePointFile; /* એક SPList ભાગ */
// વધુ કોડ અહીં છે અને અમે વર્ગ પદ્ધતિ અંદર જાય છે:
XmlTextReader textReader;
textReader = નવું XmlTextReader(mySharePointFile.OpenBinaryStream());

= textReader.WhitespaceHandling WhitespaceHandling.કોઈ નહીં;

textReader.Read();

// આ નોડ કિંમત હોય તો

સમય (textReader.Read())
{

… and so on and so forth …

ઉપર તેઓ કી બીટ અમે OpenBinaryStream મારફતે સીધા ઈન્ફોપાથ વાંચી શકે છે() method call on the SPFile as a parameter to the constructor on XmlTextReader. It works great.

</અંત>

મારા બ્લોગ પર સબ્સ્ક્રાઇબ કરો.

Twitter પર મને ખાતે અનુસરો http://www.twitter.com/pagalvin

Technorati ટૅગ્સ:

વન પર વિચાર્યું "ઝડપી હીટ: શેરપોઈન્ટ એક SPListItem સીધા ઈન્ફોપાથ XML વાંચન

  1. nesreen

    મહત્તમ,
    હું આ મદદ જરૂર , હું શેરપોઈન્ટ છે 2007 એક પુનરાવર્તન કોષ્ટક સાથે સાઇટ અને ઈન્ફોપાથ , શું હું જરૂર એક વાર ફોર્મ હું લૂપ જરૂર છે અને એસપી ફોર્મ પુસ્તકાલય ઘટના સંભાળનાર મદદથી યાદીમાં માહિતી સાચવી શેરપોઈન્ટ સ્વરૂપો પુસ્તકાલય સાચવી છે.

    કોઈપણ મદદ ખરેખર પ્રશંસા છે.

    આભારદર્શક શબ્દો

જવાબ છોડો

તમારું ઇમેઇલ સરનામું પ્રકાશિત કરવામાં આવશે નહીં. જરૂરી ક્ષેત્રો ચિહ્નિત થયેલ છે *