Working with XML Data

Using the Data Source Library, you can work with XML data stored in XML files. If these files are located on your site, SharePoint Designer dynamically creates a data connection for each file under the data source XML Files access group. If you import an XML file into a site, a corresponding connection automatically appears in the Data Source Library. As you delete or add XML files to your site, the data connections dynamically appear and disappear from the Data Source Library task pane. If you do not want to retrieve all the data from the XML file, as with lists and libraries, you can copy and modify the data connection. However, if you delete the XML file, the copy of the XML file data connection remains listed in the Data Source Library task pane, and if you click Show Data using that copy of data connection, an error message appears in the Data Source Details task pane.

Note

When you work with an XML file as a data source, the XML file must contain only well-formed XML; otherwise, it may cause errors. In addition, either the XML file must contain and conform to a schema, or it must contain data from which a schema can be inferred.

In this exercise, you will add an XML file from your file system to your site.

Note

USE the site you modified in the pervious exercise, and the Shipments.xml file. This practice file is located in the DocumentsMicrosoft PressSPD2007_SBSDataSources folder.

OPEN the site in SharePoint Designer, if it is not already open, and display the Data Source Library task pane.

  1. In the Data Source Library task pane, expand XML Files, and then click Add an XML file.

    The Data Source Properties dialog box opens.

  2. On the Source tab, click Browse to open the File Open dialog box.

  3. Navigate to DocumentsMicrosoft PressSPD2007_SBSDataSources, click Shipments.xml, and then click Open.

    A Microsoft Office SharePoint Designer message box opens, asking if you’d like to import the file.

    Note
  4. Click OK to import the file.

    The Microsoft Office SharePoint Designer message box closes, and the Import dialog box opens.

    Note
  5. Click Modify to open the Edit URL dialog box.

  6. In the File location within your web text box, type Shared Documents/Shipments.xml.

    Note
  7. Click OK to close the Edit URL dialog box, and then click OK to close the Import dialog box.

    In the Data Source Library task pane, Shipments.xml appears, and in the Folder List task pane under the Shared Documents library, Shipments.xml is listed. There is no corresponding UDC XML file in the fpdatasources library.

  8. In the Folder List task pane, under Shared Documents, right-click Shipments.xml, and then click Delete.

    The Confirm Delete message box opens.

  9. Click Yes to close the Confirm Delete message box.

    Shipments.xml disappears from both the Shared Documents library and the Data Source Library task pane.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.31.141