I've got a CSV to Java configuration file and inside one of the fields it has an ampersand. When I convert to a Java bean it adds & to the field.
HOw do I prevent smooks from doing this?
Here's the config file:
<?xml version="1.0" encoding="UTF-8"?>
<smooks-resource-list xmlns="http://ift.tt/1lg2aEi"
xmlns:csv="http://ift.tt/1rhyGah" xmlns:jb="http://ift.tt/1rhyGak">
<params>
<param name="stream.filter.type">SAX</param>
<param name="default.serialization.on">false</param>
<param name="feature-off">http://ift.tt/1seoHsG;
</params>
<csv:reader
fields="Property,PropertyID,Unit#,FloorPlan, ReportingStatus, WorkType, Sub-Status, Subject, CurrentStep, Status, DenyCounter, RevisionCounter, MoveOutDate, BaselineOPSCommitPlan, PlannedOPSCommitPlan, ActualOPSCommitPlan, BaselineCSAcceptsPlan, PlannedCSAcceptsPlan, ActualCSAcceptsPlan, BaselineOPSCommitUnit, PlannedOPSCommitUnit, ActualOPSCommitUnit, BaselineCSAcceptsUnit, PlannedCSAcceptsUnit, ActualCSAcceptsUnit, BaselineCSTurnsUnit, PlannedCSTurnsUnit, ActualCSTurnsUnit, BaselineCommunityManagerAccepts, PlannedCommunityManagerAccepts, ActualCommunityManagerAccepts, BaselineRentReady, PlannedRentReady, ActualRentReady, Area, PreleaseMove-inDate"
skipLines="1" separator=","/>
<jb:bindings beanId="UpDownUnitList" class="java.util.ArrayList" createOnElement="csv-set">
<jb:wiring beanIdRef="UpDownUnit" />
</jb:bindings>
<jb:bindings beanId="UpDownUnit" class="com.mycompany.beans.UpDownUnit" createOnElement="csv-record">
<jb:value data="csv-record/Property" property="property" />
<jb:value data="csv-record/PropertyID" property="propertyNumber" />
<jb:value data="csv-record/Unit#" property="unitName" />
...
...
...
<jb:value data="csv-record/Area" property="area" />
<jb:value data="csv-record/PreleaseMove-inDate" decoder="com.mycompany.smooks.decoders.DateNullDecoder" property="preleaseMoveInDate">
<jb:decodeParam name="format">MM.dd.yyyy</jb:decodeParam>
</jb:value>
</jb:bindings>
</smooks-resource-list>
No comments:
Post a Comment