File: binding0.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 (23 lines) | stat: -rw-r--r-- 1,124 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<!-- This is a simple example binding for using the hashmap custom
  marshaller/unmarshaller. Here the custom marshaller/unmarshaller is defined as
  the default for all instances of java.util.HashMap (by the first <mapping>
  element within the binding). There's only one instance of a HashMap included
  in the binding (the "customerMap" field in the Directory class), but any other
  instances would be handled the same way. -->
<binding>
  <mapping class="java.util.HashMap" name="map"
      marshaller="example21.HashMapper" unmarshaller="example21.HashMapper"/>
  <mapping name="directory" class="example21.Directory">
    <structure field="customerMap"/>
  </mapping>
  <mapping name="customer" class="example21.Customer" value-style="attribute">
    <structure name="name" field="name">
      <value name="first-name" field="firstName"/>
      <value name="last-name" field="lastName"/>
    </structure>
    <value name="street" field="street" style="element"/>
    <value name="city" field="city" style="element"/>
    <value name="state" field="state"/>
    <value name="zip" field="zip"/>
  </mapping>
</binding>