balu_mtx42 0 Newbie Poster

Hai all,

Please help me to compare two xml files using vb script or java script.

example of xml file

<table name="uninstall_software" numRows="0" remarks="" schema="dbo">
         <column autoUpdated="false" digits="0" id="0" name="swtitle_id" nullable="false" remarks="" size="10" type="int">
            <parent column="id" foreignKey="c_uninstall_swtitle_id" implied="false" onDeleteCascade="false" table="software_title"/>
         </column>
         <column autoUpdated="false" digits="0" id="1" name="machine_id" nullable="false" remarks="" size="10" type="int">
            <parent column="id" foreignKey="c_uninstall_machine_id" implied="false" onDeleteCascade="false" table="machine"/>
         </column>
         <primaryKey column="swtitle_id" sequenceNumberInPK="1"/>
         <primaryKey column="machine_id" sequenceNumberInPK="2"/>
         <index name="c_uninstall_software_pk" unique="true">
            <column ascending="true" name="swtitle_id"/>
            <column ascending="true" name="machine_id"/>
         </index>
         <index name="ind_uninstall_machine_id_fk" unique="false">
            <column ascending="true" name="machine_id"/>
         </index>
         <index name="ind_uninstall_swtitle_id_fk" unique="false">
            <column ascending="true" name="swtitle_id"/>
         </index>
</table>

I want to compare table wise, column wise and its constraints also. And i have one more issues how to compare special characters in below first line Reboot-pending is in single quot(') and in second line it is in &quot. then how to compare it.


<view name="inv_applicable_patch" numRows="0" remarks="" schema="dbo" viewSql="&#13;&#10;CREATE VIEW inv_applicable_patch AS &#13;&#10;  SELECT os_patch.machine_id, os_patch.os_id, patch.name, patch_type.value patch_type,&#13;&#10;    patch.repository_id, os_patch.state_timestamp, os_patch.hot_fix_id,&#13;&#10;    os_patch.fix_description, os_patch.seq_id, patch.id , patch.bundle_id, os_patch.last_modified_time&#13;&#10;    FROM os_patch, patch, patch_lookup patch_type, patch_lookup patch_status WHERE &#13;&#10;    os_patch.type_id = patch.id AND&#13;&#10;    patch.patch_type_id = patch_type.id AND&#13;&#10;    os_patch.current_status_id = patch_status.id AND&#13;&#10;    patch_status.key_name = 'status' AND&#13;&#10;    (patch_status.value = 'Missing' or patch_status.value = 'Reboot-pending') &#13;&#10;">
<view name="inv_applicable_patch" numRows="0" remarks="" schema="dbo" viewSql="&#13;&#10;CREATE VIEW inv_applicable_patch AS &#13;&#10;  SELECT os_patch.machine_id, os_patch.os_id, patch.name, patch_type.value patch_type,&#13;&#10;    patch.repository_id, os_patch.state_timestamp, os_patch.hot_fix_id,&#13;&#10;    os_patch.fix_description, os_patch.seq_id, patch.id , patch.bundle_id, os_patch.last_modified_time&#13;&#10;    FROM os_patch, patch, patch_lookup patch_type, patch_lookup patch_status WHERE &#13;&#10;    os_patch.type_id = patch.id AND&#13;&#10;    patch.patch_type_id = patch_type.id AND&#13;&#10;    os_patch.current_status_id = patch_status.id AND&#13;&#10;    patch_status.key_name = &quot;status&quot; AND&#13;&#10;    (patch_status.value = &quot;Missing&quot; or patch_status.value = &quot;Reboot-pending&quot;) &#13;&#10;">