Promote XML Nodes to Columns in Form Library
Need to automatically promote the properties (nodes) of an XML document in a Form Library using a properties.xfp file?
This can be accomplished by publishing an InfoPath form to a Form Library as well; however, these steps walk through a similar solution if you are not using InfoPath.
- Create a form library named "Books" in SharePoint (UI)
- Using SharePoint Designer, expand the "Books" node and create an XML file "Properties.xfp" in the "Forms" folder.
- Inside the Properties.xfp, add the following XML (CASE SENSITIVE):
<Fields FormAggregation="true">
<Field Type="Text" DisplayName="ISBN" Name="ISBN" Node="Book/ISBN" />
<Field Type="Text" DisplayName="Title" Name="Title" Node="Book/Title" />
<Field Type="Text" DisplayName="Last Name" Name="LastName" Node="Book/Author/LastName" />
<Field Type="Text" DisplayName="First Name" Name="FirstName" Node="Book/Author/FirstName" />
</Fields>
- Save the Properties.xfp file
- Open up your favorite XML editor (I like Notepad or EditPlus2)
- Create a new XML file: "0735622825.xml"
- Inside the new "0735622825.xml" file, add the following XML:
<?xml version="1.0" encoding="UTF-16"?>
<Book>
<ISBN>0735622825</ISBN>
<Title>Microsoft Office SharePoint 2007 Administrator's Companion</Title>
<Author>
<LastName>English</LastName>
<FirstName>Bill</FirstName>
</Author>
</Book>
- In SharePoint (UI), browse to the Books form library that you created earlier
- Upload the new XML file you just created
- Done! You should see the new XML in for the form library with SharePoint automatically creating and promoting the fields into columns of the list.
This entry was posted
on Friday, May 18th, 2007 at 3:48 am and is filed under Uncategorized.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.
Promote XML Nodes to Columns in Form Library
Need to automatically promote the properties (nodes) of an XML document in a Form Library using a properties.xfp file?
This can be accomplished by publishing an InfoPath form to a Form Library as well; however, these steps walk through a similar solution if you are not using InfoPath.
- Create a form library named "Books" in SharePoint (UI)
- Using SharePoint Designer, expand the "Books" node and create an XML file "Properties.xfp" in the "Forms" folder.
- Inside the Properties.xfp, add the following XML (CASE SENSITIVE):
<Fields FormAggregation="true">
<Field Type="Text" DisplayName="ISBN" Name="ISBN" Node="Book/ISBN" />
<Field Type="Text" DisplayName="Title" Name="Title" Node="Book/Title" />
<Field Type="Text" DisplayName="Last Name" Name="LastName" Node="Book/Author/LastName" />
<Field Type="Text" DisplayName="First Name" Name="FirstName" Node="Book/Author/FirstName" />
</Fields>
- Save the Properties.xfp file
- Open up your favorite XML editor (I like Notepad or EditPlus2)
- Create a new XML file: "0735622825.xml"
- Inside the new "0735622825.xml" file, add the following XML:
<?xml version="1.0" encoding="UTF-16"?>
<Book>
<ISBN>0735622825</ISBN>
<Title>Microsoft Office SharePoint 2007 Administrator's Companion</Title>
<Author>
<LastName>English</LastName>
<FirstName>Bill</FirstName>
</Author>
</Book>
- In SharePoint (UI), browse to the Books form library that you created earlier
- Upload the new XML file you just created
- Done! You should see the new XML in for the form library with SharePoint automatically creating and promoting the fields into columns of the list.
This entry was posted
on Friday, May 18th, 2007 at 3:48 am and is filed under Uncategorized.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.