title: How to read xml file using Sax/Dom parser in Java?
body: <p>I would like to ask you a problem. I want to read data from xml using either sax/dom parser but I don't know how to implement code in java. Any helps are highly appreciated...</p>
  
  <p>Below texts about the requirements:</p>
  
  <p>1/ xml file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;rootElement&gt;
  &lt;property name="ireport.zoom" value="1.0"/&gt;
  &lt;property name="ireport.x" value="0"/&gt;
  &lt;property name="ireport.y" value="0"/&gt;
  &lt;queryString&gt;
      &lt;![CDATA[SELECT * FROM ORDERS]]&gt;
  &lt;/queryString&gt;
  &lt;field name="ORDERID" class="java.lang.Integer"/&gt;
  &lt;field name="CUSTOMERID" class="java.lang.String"/&gt;
  &lt;field name="EMPLOYEEID" class="java.lang.Integer"/&gt;
  &lt;field name="ORDERDATE" class="java.sql.Timestamp"/&gt;
  &lt;field name="REQUIREDDATE" class="java.sql.Timestamp"/&gt;
  &lt;field name="SHIPPEDDATE" class="java.sql.Timestamp"/&gt;
  &lt;field name="SHIPVIA" class="java.lang.Integer"/&gt;
  &lt;field name="FREIGHT" class="java.math.BigDecimal"/&gt;
  &lt;field name="SHIPNAME" class="java.lang.String"/&gt;
  &lt;field name="SHIPADDRESS" class="java.lang.String"/&gt;
  &lt;field name="SHIPCITY" class="java.lang.String"/&gt;
  &lt;field name="SHIPREGION" class="java.lang.String"/&gt;
  &lt;field name="SHIPPOSTALCODE" class="java.lang.String"/&gt;
  &lt;field name="SHIPCOUNTRY" class="java.lang.String"/&gt;
  &lt;background&gt;
      &lt;band splitType="Stretch"/&gt;
  &lt;/background&gt;
  &lt;columnHeader&gt;
      &lt;band height="20" splitType="Stretch"&gt;
          &lt;staticText&gt;
              &lt;reportElement uuid="da31a9d4-8ee7-481d-8b51-270539a2fdec" x="460" y="0" width="92" height="20"/&gt;
              &lt;textElement&gt;
                  &lt;font isBold="true" isItalic="true" isUnderline="true"/&gt;
              &lt;/textElement&gt;
              &lt;text&gt;&lt;![CDATA[SHIPPEDDATE]]&gt;&lt;/text&gt;
          &lt;/staticText&gt;
      &lt;/band&gt;
  &lt;/columnHeader&gt;
  &lt;detail&gt;
      &lt;band height="20" splitType="Stretch"&gt;
          &lt;textField&gt;
              &lt;reportElement uuid="60fb99da-64ef-4bf9-8a96-687c433be35a" x="460" y="0" width="92" height="20"/&gt;
              &lt;textElement&gt;
                  &lt;font isBold="true" isItalic="true" isUnderline="true"/&gt;
              &lt;/textElement&gt;
              &lt;textFieldExpression&gt;&lt;![CDATA[$F{SHIPPEDDATE}]]&gt;&lt;/textFieldExpression&gt;
          &lt;/textField&gt;
      &lt;/band&gt;
  &lt;/detail&gt;
  &lt;/rootElement&gt;
  </code></pre>
  
  <p>2/ Expected Result:</p>
  
  <pre><code>element         : property
  elment value    : null
  attribute name  : name
  attribute value : ireport.zoom 
  attribute name  : value
  attribute value : 1.0 
  
  element         : property
  elment value    : null
  attribute name  : name
  attribute value : ireport.x
  attribute name  : value
  attribute value : 0
  
  element         : property
  elment value    : null
  attribute name  : name
  attribute value : ireport.y
  attribute name  : value
  attribute value : 0
  
  element         : queryString
  elment value    : SELECT * FROM ORDERS
  attribute name  : null
  attribute value : null
  
  element         : ORDERID
  attribute name  : class
  attribute value : java.lang.Integer
  </code></pre>
  
  <p>Any idea regarding to sax/dom parser technology using java program?
  Thanks in advance.</p>