
661
Powering Ajax Pages with Spry
17
14. Click Finish.
If one of the four layout options was chosen, the HTML is added to the page.
15. Save your page. When you save your page the first time a Spry XML Data Set is created,
Dreamweaver informs you that supporting files have been copied to your site and must be
uploaded to your remote site for final implementation. The Spry support files in this case
are
SpryData.js and xpath.js; both are placed in a SpryAssets folder at the root of the
local site.
Once your Spry Data Set layout is added to the page, you can test it easily by entering into Live view.
If you opted to choose Do Not Insert HTML as the layout option, you’ll need to add both
a Spry Region and Spry Repeat object to the page, along with the data inserted from the
Bindings panel.
Connecting to XML data
Dreamweaver refers to every connection to an XML file as a data set. Each data set connects to a
specific tag or node within a single XML file. You’ll recall that an XML file is structured to allow
repeated data, like this:
<?xml version=”1.0” encoding=”ISO-8859-1”?>
<properties>
<property>
<type>House</type>
<address>123 Main Street</address>
<city>Anytown</city>
<state>NY</state>
<zip>10003</zip>
</property>
<property>
<type>Apartment</type>
<address>456 Downtown Avenue</address>
<city>Key City</city>
<state>CA</state>
<zip>90023</zip>
</property>
</properties>
In this exa