title: How to create sub-reports using XML DataSources in JasperReports?
body: <p>I'm using <em>iReport</em> and I need to create a sub-report using a <em>XML DataSource</em>.</p>
  
  <p>I will have only one XML for the hole report. Something like this:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;question&gt;
    &lt;text&gt;What do you think about SO?&lt;/text&gt;
    &lt;options&gt;
      &lt;option&gt;Like it&lt;/option&gt;
      &lt;option&gt;Really like it&lt;/option&gt;
      &lt;option&gt;Love it&lt;/option&gt;
    &lt;/options&gt;
  &lt;/question&gt;
  </code></pre>
  
  <p>The main report will have it's detail linked to the questions, each question will have many options. Each sub-report must be linked to the options for the question... Well master-detail.</p>
  
  <p>All that I could find with some googling was using <em>SQL</em>, I want to use <em>XPath</em>.</p>