Bind XML data to the XSLT page
Now youre ready to bind XML data to the page.
- In the Bindings panel (Window > Bindings), select the item element and drag it to the empty table cell.
An XML data placeholder appears on the page. The placeholder is highlighted and in curly brackets. It uses the XPath (XML Path language) syntax to describe the hierarchical structure of the XML schema.
- Press the Right Arrow key on your keyboard to move the insertion point to the right of the XML data placeholder.
- Press the Spacebar, type a hyphen, and press the Spacebar again.
- In the Bindings panel, select the description element and drag it to the insertion point.
Another XML data placeholder appears on the page. Depending on your monitor resolution, the placeholder may move to the next line. Dont worry about this now. When you display the page in a browser later on, the data will populate the table accordingly.
- Lastly, select the price (7) in the right table cell.
- In the Bindings panel, double-click the price element.
Again, the XML data placeholder affects the layout of the page. Dont worry about this now.
The price XML data placeholder remains formatted with the menu class style because you did not remove the styles as you did for the left table cell.
- Save the page, and then preview your work in a browser by pressing F12 (Windows) or Option+F12 (Macintosh).
The browser displays the page showing one row of data from the XML file.