-
Jun 24th, 2010, 04:47 AM
#1
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules