title: Storing XML as flat file in HBASE
body: <p>I am new to HBase and I want to know how this can be done. I have the following xml file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
  &lt;interestRateCurve&gt;
  &lt;effectiveasof&gt;2016-04-27&lt;/effectiveasof&gt;
  &lt;currency&gt;JPY&lt;/currency&gt;
  &lt;baddayconvention&gt;M&lt;/baddayconvention&gt;
  
  &lt;deposits&gt;
  &lt;daycountconvention&gt;ACT/360&lt;/daycountconvention&gt;
  &lt;snaptime&gt;2016-04-26T07:00:00.000Z&lt;/snaptime&gt;
  &lt;spotdate&gt;2016-04-29&lt;/spotdate&gt;
  
  &lt;calenders&gt;
  &lt;calender&gt;TYO&lt;/calender&gt;
  &lt;/calenders&gt;
  
  &lt;curvepoint&gt;
  &lt;tenor&gt;1M&lt;/tenor&gt;
  &lt;maturitydate&gt;2016-05-30&lt;/maturitydate&gt;
  &lt;parrate&gt;-0.00066&lt;/parrate&gt;
  &lt;/curvepoint&gt;
  
  &lt;curvepoint&gt;
  &lt;tenor&gt;2M&lt;/tenor&gt;
  &lt;maturitydate&gt;2016-06-29&lt;/maturitydate&gt;
  &lt;parrate&gt;-0.00042&lt;/parrate&gt;
  &lt;/curvepoint&gt;
  
  &lt;curvepoint&gt;
  &lt;tenor&gt;3M&lt;/tenor&gt;
  &lt;maturitydate&gt;2016-07-29&lt;/maturitydate&gt;
  &lt;parrate&gt;-0.000386&lt;/parrate&gt;
  &lt;/curvepoint&gt;
  
  &lt;curvepoint&gt;
  &lt;tenor&gt;6M&lt;/tenor&gt;
  &lt;maturitydate&gt;2016-10-31&lt;/maturitydate&gt;
  &lt;parrate&gt;-0.000114&lt;/parrate&gt;
  &lt;/curvepoint&gt;
  
  &lt;curvepoint&gt;
  &lt;tenor&gt;1Y&lt;/tenor&gt;
  &lt;maturitydate&gt;2017-04-28&lt;/maturitydate&gt;o
  &lt;parrate&gt;0.000758&lt;/parrate&gt;
  &lt;/curvepoint&gt;
  
  &lt;/deposits&gt;
  
  &lt;swaps&gt;
  &lt;fixeddaycountconvention&gt;ACT/365&lt;/fixeddaycountconvention&gt;
  &lt;floatingdaycountconvention&gt;ACT/360&lt;/floatingdaycountconvention&gt;
  &lt;fixedpaymentfrequency&gt;6M&lt;/fixedpaymentfrequency&gt;
  &lt;floatingpaymentfrequency&gt;6M&lt;/floatingpaymentfrequency&gt;
  &lt;snaptime&gt;2016-04-26T07:00:00.000Z&lt;/snaptime&gt;
  &lt;spotdate&gt;2016-04-29&lt;/spotdate&gt;
  
  &lt;calenders&gt;
  &lt;calendar&gt;TYO&lt;/calendar&gt;
  &lt;/calenders&gt;
  
  &lt;curvepoint&gt;
  &lt;tenor&gt;2Y&lt;/tenor&gt;
  &lt;maturitydate&gt;2018-04-29&lt;/maturitydate&gt;
  &lt;parrate&gt;-0.0016&lt;/parrate&gt;
  &lt;/curvepoint&gt;
  
  &lt;curvepoint&gt;
  &lt;tenor&gt;3Y&lt;/tenor&gt;
  &lt;maturitydate&gt;2019-04-29&lt;/maturitydate&gt;
  &lt;parrate&gt;-0.001663&lt;/parrate&gt;
  &lt;/curvepoint&gt;
  
  &lt;curvepoint&gt;
  &lt;tenor&gt;4Y&lt;/tenor&gt;
  &lt;maturitydate&gt;2020-04-29&lt;/maturitydate&gt;
  &lt;parrate&gt;-0.001388&lt;/parrate&gt;
  &lt;/curvepoint&gt;
  
  &lt;curvepoint&gt;
  &lt;tenor&gt;5Y&lt;/tenor&gt;
  &lt;maturitydate&gt;2021-04-29&lt;/maturitydate&gt;
  &lt;parrate&gt;-0.000963&lt;/parrate&gt;
  &lt;/curvepoint&gt;
  
  &lt;curvepoint&gt;
  &lt;tenor&gt;6Y&lt;/tenor&gt;
  &lt;maturitydate&gt;2022-04-29&lt;/maturitydate&gt;
  &lt;parrate&gt;-0.000475&lt;/parrate&gt;
  &lt;/curvepoint&gt;
  
  &lt;curvepoint&gt;
  &lt;tenor&gt;7Y&lt;/tenor&gt;
  &lt;maturitydate&gt;2023-04-29&lt;/maturitydate&gt;
  &lt;parrate&gt;-0.0000063&lt;/parrate&gt;
  &lt;/curvepoint&gt;
  
  &lt;curvepoint&gt;
  &lt;tenor&gt;8Y&lt;/tenor&gt;
  &lt;maturitydate&gt;2024-04-29&lt;/maturitydate&gt;
  &lt;parrate&gt;0.000425&lt;/parrate&gt;
  &lt;/curvepoint&gt;
  &lt;curvepoint&gt;
  &lt;tenor&gt;9Y&lt;/tenor&gt;
  &lt;maturitydate&gt;2025-04-29&lt;/maturitydate&gt;
  &lt;parrate&gt;0.000813&lt;/parrate&gt;
  &lt;/curvepoint&gt;
  &lt;curvepoint&gt;
  &lt;tenor&gt;10Y&lt;/tenor&gt;
  &lt;maturitydate&gt;2026-04-29&lt;/maturitydate&gt;
  &lt;parrate&gt;0.0012&lt;/parrate&gt;
  &lt;/curvepoint&gt;
  
  &lt;curvepoint&gt;
  &lt;tenor&gt;12Y&lt;/tenor&gt;
  &lt;maturitydate&gt;2028-04-29&lt;/maturitydate&gt;
  &lt;parrate&gt;0.002038&lt;/parrate&gt;
  &lt;/curvepoint&gt;
  
  &lt;curvepoint&gt;
  &lt;tenor&gt;15Y&lt;/tenor&gt;
  &lt;maturitydate&gt;2031-04-29&lt;/maturitydate&gt;
  &lt;parrate&gt;0.00315&lt;/parrate&gt;
  &lt;/curvepoint&gt;
  &lt;curvepoint&gt;
  &lt;tenor&gt;20Y&lt;/tenor&gt;
  &lt;maturitydate&gt;2036-04-29&lt;/maturitydate&gt;
  &lt;parrate&gt;0.004588&lt;/parrate&gt;
  &lt;/curvepoint&gt;
  
  &lt;curvepoint&gt;
  &lt;tenor&gt;30Y&lt;/tenor&gt;
  &lt;maturitydate&gt;2046-04-29&lt;/maturitydate&gt;
  &lt;parrate&gt;0.005688&lt;/parrate&gt;
  &lt;/curvepoint&gt;
  &lt;/swaps&gt;
  &lt;/interestRateCurve&gt;
  </code></pre>
  
  <p>I want to store it as a table in HBase in the following format:</p>
  
  <pre><code>RowID      |  Deposit-1M | Deposit-2M |....| Swaps-2Y| Swaps-3Y | ....|Swaps-30Y
  2016-04-27_JPY | val1 | val2 |.......
  </code></pre>
  
  <p>So, I want to store it as a single column with values for each tag under <code>&lt;curvepoint&gt;</code> for <code>Deposits-1M</code> (where <code>1M</code> is the <code>&lt;tenor&gt;</code> value). And similarly for <code>Swaps</code>. </p>
  
  <p>Please tell me how do I do it in Java. I just cannot understand!!</p>