13.07.2015 Views

iReport Ultimate Guide - Nimsoft Library

iReport Ultimate Guide - Nimsoft Library

iReport Ultimate Guide - Nimsoft Library

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

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

Data Sources and Query Executers• To map a field, select an attribute name and click the Add Selected Field(s) button.Figure 11-17 Exploring a JavaBean to map the fields of the report11.6.3 Using XML Data SourcesUR provides the ability to use an XML document as data source. An XML document is typically organized as atree, and its structure hardly matches the table-like form required by UR. For this reason, you have to use an XPathexpression to define a node set. The specifications of the XPath language are available at http://www.w3.org/TR/xpath; it isused to identify values or nodes in an XML document. Some examples will be useful to help you to know how to define thenodes.Consider the XML file in Table 11-1. It is a hypothetical address book in which different people appear, grouped incategories. At the end of the categories list, a second list, of favorites objects, appears. In this case, it is possible to definedifferent node set types. The choice is determined by how you want to organize the data in your report.Code Example 11-3 Example XML fileDavolioNancyFullerAndrewLeverling187

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

Saved successfully!

Ooh no, something went wrong!