In this post we will discuss about how to create data connection in XML file in infopath in SharePoint 2010.
Also you can check out my previous posts on:
Below are the steps on how to create a data connection with XML file in infopath:
1. Suppose we want to retrieve some field data like first name, lastname etc.
So we first we have to create XML file.
2. Just copy the below code and paste it on a notepad and save it as template.xml.
<?xml version="1.0" encoding="UTF-8"?>
<Method ID="1" Cmd="New">
3. Now open a blank form library.
4. Go to Data tab, click on data connection and then click on Add.
5. Now choose your type of connection submit data/receive data and click on Next.
6. Now choose XML document from the radio buttons and click on Next.
7. Now click on browse and choose your xml file as we created "template.xml".
8. Now click on next and lastly provide the data connection name as you want.
9. Now your XML data connection is ready to retrieve data.