Announcement Announcement Module
Collapse
No announcement yet.
Marshaller help... Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Marshaller help...

    Hey all,

    I am currently working a batch program using spring in which a persons details are parsed from xml to be written to a database, now there is a class person that has fields such as name, DOB etc, and they are marshalled as such:
    <bean id="personMarshaller" class="org.springframework.oxm.xstream.XStreamMars haller">
    <property name="aliases">
    <util:map id="aliases">
    <entry key="PersonCoverage" value="blah.blah.objects.PersonCoverage" />
    <entry key="id" value="java.lang.String" />
    <entry key="personId" value="java.lang.String" />
    <entry key="loginId" value="java.lang.String" />
    <entry key="commonName" value="java.lang.String" />
    <entry key="cvgAttr1" value="java.lang.String" />
    <entry key="cvgAttr2" value="java.lang.String" />
    <entry key="updatedBy" value="java.lang.String" />
    <entry key="updatedByName" value="java.lang.String" />
    <entry key="updatedByMsId" value="java.lang.String" />
    <entry key="updatedDate" value="java.lang.String" />
    <entry key="personStatus" value="java.lang.String" />
    </util:map>
    </property>
    </bean>


    now I was wondering that because the marshaller maps every xml tag to a field in person the program wouldn't really cope with a change of tag, or a new tag in the XML input, is there a marshaller that can create classes just based on the tags?

    Any help would be sweet
Working...
X