Value Binder.
This class can be used to configure a Smooks instance for creating value
objects using the Smooks DataDecoders.
XML Schema & Namespace
The Value Binder XML configuration schema is in the following XML Schema Namespace:
http://www.milyn.org/xsd/smooks/javabean-1.3.xsd
The value binder element is '<value>'. Take a look in the schema for all
the configuration attributes.
Programmatic configuration
The value binder can be programmatic configured using the
Value Object.
Example
Taking the "classic" Order message as an example and getting the order number and
name as Value Objects in the form of an Integer and String.
The Message
<order xmlns="http://x">
<header>
<y:date xmlns:y="http://y">Wed Nov 15 13:45:28 EST 2006</y:date>
<customer number="123123">Joe</customer>
<privatePerson></privatePerson>
</header>
<order-items>
<!-- .... -->
</order-items>
</order>
The Binding Configuration
<?xml version="1.0"?>
<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd" xmlns:jb="http://www.milyn.org/xsd/smooks/javabean-1.3.xsd">
<jb:value
beanId="customerName"
data="customer"
default="unknown"
/>
<jb:value
beanId="customerNumber"
data="customer/@number"
decoder="Integer"
/>
</smooks-resource-list>