Operation Manual
Select Do Not Insert HTML. If you select this option, Dreamweaver creates the data set, but does not add any HTML to
the page. The data set becomes available from the Bindings panel (Window > Bindings), and you can manually drag
pieces of data from the data set to the page.
6. Click Done.
Dreamweaver creates the data set and, if you selected a layout option, displays the layout and data placeholders on your
page. If you look in Code view, you’ll see that Dreamweaver has added references in the header to the SpryData.js file and
the SpryHTMLDataSet.js file. These files are important Spry assets that work in conjunction with the page. Be sure not to
remove this code from your page or the data set will not function. When you upload your page to a server, you’ll also need to
upload these files as dependent files
Create a Spry XML data set
1. If you are only creating a data set, you do not need to worry about the insertion point. If you are creating a data set and also
inserting a layout, make sure that the insertion point is where you want to insert the layout on the page.
2. Choose Insert > Spry > Spry Data Set.
3. In the Specify Data Source screen, do the following:
Select XML from the Select Data Type pop-up menu.
Specify a name for the new data set. The default name is ds1 the first time you create a data set. The data set name can
contain letters, numbers, and underscores, but cannot start with a number.
Specify the path to the file that contains your XML data source. The path can be a relative path to a local file in your site
(for example, datafiles/data.xml), or an absolute URL to a page on the web (using HTTP or HTTPS). You can click the
Browse button to navigate to a local file and select it.
Dreamweaver renders the XML data source in the Row Elements window, displaying the XML tree of data elements
available for selection. Repeating elements are marked with a plus (+) sign, and child elements are indented.
Alternatively you can specify a Design Time Feed as your data source. For more information, see Use a design-time feed.
Select the element that contains the data you want to display. Typically this element is a repeating element, such as
<menu_item>, with several children elements, such as <item>, <link>, <description>, and so on.
Selecting a repeating element for the XML data set.
Once you select the container element for the data set, Dreamweaver displays a preview of the data set in the Data
Preview window. The XPath text box displays an expression that shows where the selected node is located in the XML
source file.
Note: XPath (XML Path Language) is a syntax for addressing portions of an XML document. It is used mostly as a query
language for XML data, just as the SQL language is used to query databases. For more information on XPath, see the
XPath language specification on the W3C website at www.w3.org/TR/xpath.
When you’re finished in the Specify Data Source screen, click Done to create the data set right away, or click Next to go
on to the Set Data Options screen. If you click Done, the data set becomes available in the Bindings panel (Window >
Bindings).
4. In the Set Data Options screen, do the following:
313