04.02.2013 Views

Spry User Guide - Support - Adobe

Spry User Guide - Support - Adobe

Spry User Guide - Support - Adobe

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Example of selecting and flattening an element with attributes and a text value<br />

The following code shows data selected with the /gallery/photographer XPath, in bold:<br />

<br />

John Doe<br />

john@doe.com<br />

<br />

<br />

<br />

<br />

<br />

<br />

The following is the DOM-tree representation of the selected node.<br />

The data set then flattens the selected data into the following table.<br />

photographer @id<br />

John Doe 16<br />

In this particular case, only one node is selected, so we only get one row in our data set. The value of the photographer<br />

node is the text "John Doe",soacolumnnamedphotographer is created to store that value. The id attribute<br />

is an attribute of the photographer node, so its value is placed in the @id column. All attribute names are preceded<br />

by an @ sign.<br />

Example of selecting and flattening an element with attributes and element children<br />

The following code shows data selected with the /gallery XPath:<br />

<br />

John Doe<br />

john@doe.com<br />

<br />

<br />

<br />

<br />

<br />

<br />

SPRY<br />

<strong>User</strong> <strong>Guide</strong><br />

96

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!