File: binding2a.xml

package info (click to toggle)
libjibx1.2-java 1.2.6-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 26,260 kB
  • sloc: java: 75,013; xml: 14,068; makefile: 17
file content (22 lines) | stat: -rw-r--r-- 1,059 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<!-- Adds a layer of of wrapper element around the optional component from the
 basic binding, using a test method to control output. Also uses unordered
 structure with a single child component to duplicate error found by user, and
 get/set methods for accessing object with private constructor. -->
<binding>
  <mapping name="customer" class="simple.Customer2">
    <structure name="name" usage="optional" test-method="hasName" ordered="false">
      <structure name="first-and-last" usage="optional">
        <value name="first-name" field="firstName" usage="optional"/>
        <value name="last-name" field="lastName" usage="optional"/>
        <structure name="ignored" usage="optional"/>
      </structure>
    </structure>
    <structure get-method="getAddress" set-method="setAddress" usage="optional">
      <value name="street1" field="street1"/>
      <value name="city" field="city"/>
      <value name="state" field="state"/>
      <value name="zip" field="zip"/>
    </structure>
    <value name="phone" field="phone"/>
  </mapping>
</binding>