XPath Filtering Sample

The XPath you pass to the data set constructor can also contain an XPath expression. You can use an XPath expression to filter out XML nodes before the data set actually has a chance to flatten it.

Some example uses of XPath filtering are for data paging, or matching specific nodes based on attribute or node values.


Here's an example where we are only displaying the names of 10 states from our XML file starting at offset 30.

Here's an example where we are using XPath to match the state node for "New York".