fyzhou / beanio

Automatically exported from code.google.com/p/beanio
Apache License 2.0
0 stars 0 forks source link

Add support for "static" record marshalling #36

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Add the capability to marshal "static" records not bound to a bean object, for 
instance, the header record in the following example:

<beanio xmlns="http://www.beanio.org/2012/03">
  <stream name="stream" format="csv">
    <record name="header" order="1" occurs="1">
      <field name="h1" default="Header1" />
      <field name="h2" default="Header2" />
      <field name="h3" default="Header3" />
    </record>
    <record name="detail" class="map" order="2" occurs="0+">
      <field name="d1" />
      <field name="d2" />
      <field name="d3" />
    </record>
  </stream>
</beanio>

Original issue reported on code.google.com by kevin.s...@gmail.com on 26 May 2012 at 8:13

GoogleCodeExporter commented 9 years ago
This will be supported for now by allowing the following BeanWriter call:

writer.write("header", null);

(In prior versions, a null bean object always throws a BeanWriterException.)

Original comment by kevin.s...@gmail.com on 26 May 2012 at 8:40

GoogleCodeExporter commented 9 years ago
Fixed for 2.0.1.

Original comment by kevin.s...@gmail.com on 26 May 2012 at 8:52

GoogleCodeExporter commented 9 years ago

Original comment by kevin.s...@gmail.com on 1 Jul 2012 at 9:01