Posts

Showing posts from October, 2012

Get data from InfoPath form using Object Model(C#)

The InfoPath forms (.xml) files stored in the following Path Open the site inthe SharePoint desinger, click on All Files folder and list -> Open any xml file   <my:group7>     <my:group8>      <my:ListOfAttendee>Ravi</my:ListOfAttendee>      <my:Organization>Financial Services</my:Organization>     </my:group8>     <my:group8>      <my:ListOfAttendee>Kumar</my:ListOfAttendee>      <my:Organization>IT Department</my:Organization>     </my:group8><my:group8>      <my:ListOfAttendee>Mohan</my:ListOfAttendee>      <my:Organization>HR</my:Organization>     </my:group8>    </my:group7> use the below code: SPFile file = properties.ListItem.File;            if (file == null)                return;            // Get the binary data of the file            byte[] xmlFormData = null;            xmlFormData = file.OpenBinary();            // Load the data into an XPathD