1 Reply Latest reply on Oct 3, 2008 8:58 AM by Gregory Lafrance

    Attribute Extraction

    kvramach
      Dears,

      I want to extract a attribute from a XML file. Can anyone please help me in this regard.

      Regards,
      Ram

      Sample XML file: ( Here i want to extract the attribute: valueClass)


      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE jasperPrint PUBLIC "-//JasperReports//DTD JasperPrint//EN" " http://jasperreports.sourceforge.net/dtds/jasperprint.dtd">

      <jasperPrint name="Buzz_Trend" pageWidth="595" pageHeight="842" locale="en_US" timezone="Asia/Calcutta">
      <property name="net.sf.jasperreports.export.xml.page.count" value="1"/>
      <origin band="background"/>
      <origin band="title"/>
      <origin band="pageHeader"/>
      <origin band="columnHeader"/>
      <origin band="detail"/>
      <origin band="columnFooter"/>
      <origin band="pageFooter"/>
      <page>
      <text textHeight="12.578125" lineSpacingFactor="1.2578125" leadingOffset="-2.1972656" hyperlinkType="None" valueClass="java.math.BigDecimal" pattern="#0.00">
      <reportElement key="textField" x="337" y="29" width="100" height="18" origin="4"/>
      <textContent><![CDATA[86.00]]></textContent>
      </text>
      <text textHeight="12.578125" lineSpacingFactor="1.2578125" leadingOffset="-2.1972656" hyperlinkType="None" valueClass="java.sql.Timestamp" pattern="M/d/yy h:mm a">
      <reportElement key="textField" x="158" y="29" width="100" height="18" origin="4"/>
      <textContent><![CDATA[9/26/08 12:00 AM]]></textContent>
      </text>
      <text textHeight="12.578125" lineSpacingFactor="1.2578125" leadingOffset="-2.1972656" hyperlinkType="None" valueClass="java.math.BigDecimal" pattern="#0.00">
      <reportElement key="textField" x="337" y="79" width="100" height="18" origin="4"/>
      <textContent><![CDATA[78.00]]></textContent>
      </text>
      <text textHeight="12.578125" lineSpacingFactor="1.2578125" leadingOffset="-2.1972656" hyperlinkType="None" valueClass="java.sql.Timestamp" pattern="M/d/yy h:mm a">
      <reportElement key="textField" x="158" y="79" width="100" height="18" origin="4"/>
      <textContent><![CDATA[9/27/08 12:00 AM]]></textContent>
      </text>
      <text textHeight="12.578125" lineSpacingFactor="1.2578125" leadingOffset="-2.1972656" hyperlinkType="None" valueClass="java.math.BigDecimal" pattern="#0.00">
      <reportElement key="textField" x="337" y="129" width="100" height="18" origin="4"/>
      <textContent><![CDATA[56.00]]></textContent>
      </text>
      <text textHeight="12.578125" lineSpacingFactor="1.2578125" leadingOffset="-2.1972656" hyperlinkType="None" valueClass="java.sql.Timestamp" pattern="M/d/yy h:mm a">
      <reportElement key="textField" x="158" y="129" width="100" height="18" origin="4"/>
      <textContent><![CDATA[9/28/08 12:00 AM]]></textContent>
      </text>
      <text textHeight="12.578125" lineSpacingFactor="1.2578125" leadingOffset="-2.1972656" hyperlinkType="None" valueClass="java.math.BigDecimal" pattern="#0.00">
      <reportElement key="textField" x="337" y="179" width="100" height="18" origin="4"/>
      <textContent><![CDATA[89.00]]></textContent>
      </text>
      <text textHeight="12.578125" lineSpacingFactor="1.2578125" leadingOffset="-2.1972656" hyperlinkType="None" valueClass="java.sql.Timestamp" pattern="M/d/yy h:mm a">
      <reportElement key="textField" x="158" y="179" width="100" height="18" origin="4"/>
      <textContent><![CDATA[9/29/08 12:00 AM]]></textContent>
      </text>
      </page>
      </jasperPrint>