hi all,
while on developerworks reading dennis' articles, i also
came across this one:
http://www-128.ibm.com/developerworks/java/library/x-pracdb8.html
entitled: 'xpath as a data binding tool, part 1'
i have to admit i just skimmed the article but it grabbed
my attention. i've been thinking for a while that adding
xpath to jibx would be a good move.
more specifically what i mean is that the jibx binding
vocabulary could be extended nicely with xpath support.
here's an example binding file:
<binding name="binding1">
<mapping name="customer" class="simple.Customer">
<structure field="name">
<value name="first-name" field="firstName"/>
<value name="last-name" field="lastName"/>
</structure>
<value name="street" field="street1"/>
<value name="city" field="city"/>
<value name="state" field="state"/>
<value name="zip" field="zip"/>
<value name="phone" field="phone"/>
</mapping>
</binding>
in jibx we use the attribute 'name' to bind a specific
element or attribute name to a java field. i think that could
be a perfect spot in the jibx binding file for introducing
an alternative to name="" : xpath=""
as in:
<value xpath="name/first-name" field="firstName" />
i know this is not a complete description of how such an
enhancement would work or fit in to jibx. but it's a starting
point for consideration, and definitely for discussion.
/ eitan
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users