This discussion is archived
5 Replies Latest reply: Dec 6, 2012 12:22 PM by Gautam Singh RSS

SQL insert scripts generation from repository data xml file

SivaS Newbie
Currently Being Moderated
Hi All,

I want to generate sql insert scripts from repository data xml file which contain <add-item>elements.

Example: data xml file is contains

<add-item item-descriptor="user" id="741">
<set-property name="gender"><![CDATA[female]]></set-property>
<set-property name="emailStatus"><![CDATA[__NULL__]]></set-property>
<set-property name="receiveEmail"><![CDATA[__NULL__]]></set-property>
<set-property name="email"><![CDATA[sally@example.com]]></set-property>
<set-property name="password"><![CDATA[a694cb1d6d011eddc444acb77338c1df6a22bac5de26330e2fe1d20f15f97ed6]]></set-property>
<!-- rdonly derived <set-property name="abandonedOrderCount"><![CDATA[0]]></set-property> -->
<set-property name="locale"><![CDATA[de_DE]]></set-property>
<set-property name="userType"><![CDATA[1]]></set-property>
<set-property name="autoLogin"><![CDATA[__NULL__]]></set-property>
<set-property name="lastName"><![CDATA[Springford]]></set-property>
<set-property name="member"><![CDATA[true]]></set-property>
<set-property name="dateOfBirth"><![CDATA[7/18/1951 00:00:00]]></set-property>
<!-- rdonly derived <set-property name="age"><![CDATA[61]]></set-property> -->
<set-property name="registrationDate"><![CDATA[5/16/1996 00:00:00]]></set-property>
<set-property name="login"><![CDATA[sally]]></set-property>
<set-property name="lastActivity"><![CDATA[6/9/1999 00:00:00]]></set-property>
<set-property name="homeAddress"><![CDATA[741]]></set-property>
<set-property name="passwordSalt"><![CDATA[sally]]></set-property>
<set-property name="generatedPassword"><![CDATA[__NULL__]]></set-property>
<set-property name="firstName"><![CDATA[Sally]]></set-property>
<set-property name="lastPasswordUpdate"><![CDATA[__NULL__]]></set-property>
</add-item>


Thanks
Siva

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points