EDN Admin
Well-known member
<p style="background:white <span style="font-size:9.0pt; font-family:Verdana; color:black I have two large XMLDocuments which contains few differences (may contain a lot sometimes). The two sample XMLdocuments are copied below. Basically,<span> @OriginalXML consists
of user permissions currently an user assigned . i.e for protocol ID=0 , System Administrator, Configuration Administrator ,DataManager etc Assignment is 0. @ModifiedXML consists of added permissions via UserInterface. for ex. Assigned
value is changed to 1 in ModifiedXML<span> for SystemAdministrator, Configuration Administrator etc. (Please not the OriginalXML and Modified XML has been condensed due to character limit. It literally has 200 protocols which
which leads to large amount of xml.).
<p style="background:white <span style="font-size:9.0pt; font-family:Verdana; color:black
<p style="background:white <span style="font-family:Verdana <span style="font-size:12px
<p style=" <span style="font-size:9.0pt; font-family:Verdana; color:black
<p style="background-color:white <span style="font-size:9pt; font-family:Verdana; color:black @OriginalXML <span><span style="font-size:9.0pt; font-family:Verdana; color:black <span style="font-size:9pt; font-family:Verdana; color:black =
<root><Protocol ID="0 <UserLevel ID="1" Assigned="0" Name="System Administrator" /><UserLevel ID="2" Assigned="0" Name="Configuration Administrator" /><UserLevel ID="3" Assigned="0" Name="Data Manager." /><UserLevel ID="4"
Assigned="0" Name="Help Desk" /><UserLevel ID="5" Assigned="0" Name="Sponsor" /><UserLevel ID="6" Assigned="0" Name="Monitor" /><UserLevel ID="7" Assigned="0" Name="Site Administrator" /><UserLevel ID="8" Assigned="0" Name="Investigator"
/><UserLevel ID="9" Assigned="0" Name="Site User" /><UserLevel ID="10" Assigned="0" Name="Auditor" /><UserLevel ID="11" Assigned="0" Name="Viewer" /><UserLevel ID="12" Assigned="0" Name="Spirometry Over-Reader" /><UserLevel ID="14"
Assigned="0" Name="BS-Bug 939(Name Issue with subject Permissions in CRF )" /><UserLevel ID="16" Assigned="0" Name="new test user group" /><UserLevel ID="17" Assigned="0" Name="usergroup_1" /><UserLevel ID="18" Assigned="0" Name="userGroup_2Edit"
/><UserLevel ID="19" Assigned="0" Name="userGroup_3viewdeleted" /><UserLevel ID="20" Assigned="0" Name="UserGroup_SubjectEdit" /><UserLevel ID="21" Assigned="0" Name="userGroup_Delete_withoutRestore" /><UserLevel ID="22" Assigned="1"
Name="Group_Query" /><UserLevel ID="23" Assigned="0" Name="userGroup_ViewUser" /><UserLevel ID="24" Assigned="0" Name="TEst Group" /></Protocol><Protocol ID="7" Name="993 <UserLevel ID="2" Assigned="0" Name="Configuration Administrator"
/><UserLevel ID="3" Assigned="0" Name="Data Manager." /><UserLevel ID="4" Assigned="0" Name="Help Desk" /><UserLevel ID="5" Assigned="0" Name="Sponsor" /><UserLevel ID="6" Assigned="0" Name="Monitor" /><UserLevel ID="7" Assigned="0"
Name="Site Administrator" /><UserLevel ID="8" Assigned="0" Name="Investigator" /><UserLevel ID="9" Assigned="0" Name="Site User" /><UserLevel ID="10" Assigned="0" Name="Auditor" /><UserLevel ID="11" Assigned="0" Name="Viewer" /><UserLevel
ID="12" Assigned="0" Name="Spirometry Over-Reader" /><UserLevel ID="14" Assigned="0" Name="BS-Bug 939(Name Issue with subject Permissions in CRF )" /><UserLevel ID="16" Assigned="0" Name="new test user group" /><UserLevel ID="17" Assigned="0"
Name="usergroup_1" /><UserLevel ID="18" Assigned="0" Name="userGroup_2Edit" /><UserLevel ID="19" Assigned="0" Name="userGroup_3viewdeleted" /><UserLevel ID="20" Assigned="0" Name="UserGroup_SubjectEdit" /><UserLevel ID="21" Assigned="0"
Name="userGroup_Delete_withoutRestore" /><UserLevel ID="22" Assigned="0" Name="Group_Query" /><UserLevel ID="23" Assigned="0" Name="userGroup_ViewUser" /><UserLevel ID="24" Assigned="0" Name="TEst Group" /></Protocol</root>
<p style="background-color:white <span style="font-size:9.0pt; font-family:Verdana; color:black
<p style="background-color:white <span style="font-size:9.0pt; font-family:Verdana; color:black
<p style="background-color:white <span style="font-size:9.0pt; font-family:Verdana; color:black @ModifiedXML <span style="font-size:9pt; font-family:Verdana; color:black = <root><Protocol ID="0 <UserLevel ID="1" Assigned="1"
Name="System Administrator" /><UserLevel ID="2" Assigned="1" Name="Configuration Administrator" /><UserLevel ID="3" Assigned="1" Name="Data Manager." /><UserLevel ID="4" Assigned="1" Name="Help Desk" /><UserLevel ID="5" Assigned="1"
Name="Sponsor" /><UserLevel ID="6" Assigned="1" Name="Monitor" /><UserLevel ID="7" Assigned="0" Name="Site Administrator" /><UserLevel ID="8" Assigned="0" Name="Investigator" /><UserLevel ID="9" Assigned="0" Name="Site User" /><UserLevel
ID="10" Assigned="0" Name="Auditor" /><UserLevel ID="11" Assigned="0" Name="Viewer" /><UserLevel ID="12" Assigned="0" Name="Spirometry Over-Reader" /><UserLevel ID="14" Assigned="0" Name="BS-Bug 939(Name Issue with subject Permissions in
CRF )" /><UserLevel ID="16" Assigned="0" Name="new test user group" /><UserLevel ID="17" Assigned="0" Name="usergroup_1" /><UserLevel ID="18" Assigned="0" Name="userGroup_2Edit" /><UserLevel ID="19" Assigned="0" Name="userGroup_3viewdeleted"
/><UserLevel ID="20" Assigned="0" Name="UserGroup_SubjectEdit" /><UserLevel ID="21" Assigned="0" Name="userGroup_Delete_withoutRestore" /><UserLevel ID="22" Assigned="1" Name="Group_Query" /><UserLevel ID="23" Assigned="0" Name="userGroup_ViewUser"
/><UserLevel ID="24" Assigned="0" Name="TEst Group" /></Protocol><Protocol ID="7" Name="993 <UserLevel ID="2" Assigned="0" Name="Configuration Administrator" /><UserLevel ID="3" Assigned="0" Name="Data Manager." /><UserLevel
ID="4" Assigned="0" Name="Help Desk" /><UserLevel ID="5" Assigned="0" Name="Sponsor" /><UserLevel ID="6" Assigned="0" Name="Monitor" /><UserLevel ID="7" Assigned="0" Name="Site Administrator" /><UserLevel ID="8" Assigned="0" Name="Investigator"
/><UserLevel ID="9" Assigned="0" Name="Site User" /><UserLevel ID="10" Assigned="0" Name="Auditor" /><UserLevel ID="11" Assigned="0" Name="Viewer" /><UserLevel ID="12" Assigned="0" Name="Spirometry Over-Reader" /><UserLevel ID="14"
Assigned="0" Name="BS-Bug 939(Name Issue with subject Permissions in CRF )" /><UserLevel ID="16" Assigned="0" Name="new test user group" /><UserLevel ID="17" Assigned="0" Name="usergroup_1" /><UserLevel ID="18" Assigned="0" Name="userGroup_2Edit"
/><UserLevel ID="19" Assigned="0" Name="userGroup_3viewdeleted" /><UserLevel ID="20" Assigned="0" Name="UserGroup_SubjectEdit" /><UserLevel ID="21" Assigned="0" Name="userGroup_Delete_withoutRestore" /><UserLevel ID="22" Assigned="0"
Name="Group_Query" /><UserLevel ID="23" Assigned="0" Name="userGroup_ViewUser" /><UserLevel ID="24" Assigned="0" Name="TEst Group" /></Protocol</root>
<p style="background:white <span style="font-size:9.0pt; font-family:Verdana; color:black As a part of SP update, I need exactly what permissions have been added in<span> @ModifiedXML . Hence difference between two XMLDocuments
doesnt work here. In the follwing examples, ProtocolID doesnt change but Assigned attribute value for UserLevelIDs change.
<p style="background:white <span style="font-size:9.0pt; font-family:Verdana; color:black for ex, This would be the exact output I would be needing. <root><Protocol ID="0 <UserLevel ID="1" Assigned="1" Name="System Administrator" /><UserLevel
ID="2" Assigned="1" Name="Configuration Administrator" /><UserLevel ID="3" Assigned="1" Name="Data Manager." /><UserLevel ID="4" Assigned="1" Name="Help Desk" /><UserLevel ID="5" Assigned="1" Name="Sponsor" /><UserLevel ID="6" Assigned="1"
Name="Monitor" /><root>
<p style="background:white <span style="font-size:9.0pt; font-family:Verdana; color:black
<p style="background:white <span style="font-size:9.0pt; font-family:Verdana; color:black I am not sure how to proceed. Any Ideas?
<p style="background:white <span style="font-size:9.0pt; font-family:Verdana; color:black
<p style="background:white <span style="font-size:9.0pt; font-family:Verdana; color:black Thanks in Advance
<p style="background:white <span style="font-size:9.0pt; font-family:Verdana; color:black Ruben.
View the full article
of user permissions currently an user assigned . i.e for protocol ID=0 , System Administrator, Configuration Administrator ,DataManager etc Assignment is 0. @ModifiedXML consists of added permissions via UserInterface. for ex. Assigned
value is changed to 1 in ModifiedXML<span> for SystemAdministrator, Configuration Administrator etc. (Please not the OriginalXML and Modified XML has been condensed due to character limit. It literally has 200 protocols which
which leads to large amount of xml.).
<p style="background:white <span style="font-size:9.0pt; font-family:Verdana; color:black
<p style="background:white <span style="font-family:Verdana <span style="font-size:12px
<p style=" <span style="font-size:9.0pt; font-family:Verdana; color:black
<p style="background-color:white <span style="font-size:9pt; font-family:Verdana; color:black @OriginalXML <span><span style="font-size:9.0pt; font-family:Verdana; color:black <span style="font-size:9pt; font-family:Verdana; color:black =
<root><Protocol ID="0 <UserLevel ID="1" Assigned="0" Name="System Administrator" /><UserLevel ID="2" Assigned="0" Name="Configuration Administrator" /><UserLevel ID="3" Assigned="0" Name="Data Manager." /><UserLevel ID="4"
Assigned="0" Name="Help Desk" /><UserLevel ID="5" Assigned="0" Name="Sponsor" /><UserLevel ID="6" Assigned="0" Name="Monitor" /><UserLevel ID="7" Assigned="0" Name="Site Administrator" /><UserLevel ID="8" Assigned="0" Name="Investigator"
/><UserLevel ID="9" Assigned="0" Name="Site User" /><UserLevel ID="10" Assigned="0" Name="Auditor" /><UserLevel ID="11" Assigned="0" Name="Viewer" /><UserLevel ID="12" Assigned="0" Name="Spirometry Over-Reader" /><UserLevel ID="14"
Assigned="0" Name="BS-Bug 939(Name Issue with subject Permissions in CRF )" /><UserLevel ID="16" Assigned="0" Name="new test user group" /><UserLevel ID="17" Assigned="0" Name="usergroup_1" /><UserLevel ID="18" Assigned="0" Name="userGroup_2Edit"
/><UserLevel ID="19" Assigned="0" Name="userGroup_3viewdeleted" /><UserLevel ID="20" Assigned="0" Name="UserGroup_SubjectEdit" /><UserLevel ID="21" Assigned="0" Name="userGroup_Delete_withoutRestore" /><UserLevel ID="22" Assigned="1"
Name="Group_Query" /><UserLevel ID="23" Assigned="0" Name="userGroup_ViewUser" /><UserLevel ID="24" Assigned="0" Name="TEst Group" /></Protocol><Protocol ID="7" Name="993 <UserLevel ID="2" Assigned="0" Name="Configuration Administrator"
/><UserLevel ID="3" Assigned="0" Name="Data Manager." /><UserLevel ID="4" Assigned="0" Name="Help Desk" /><UserLevel ID="5" Assigned="0" Name="Sponsor" /><UserLevel ID="6" Assigned="0" Name="Monitor" /><UserLevel ID="7" Assigned="0"
Name="Site Administrator" /><UserLevel ID="8" Assigned="0" Name="Investigator" /><UserLevel ID="9" Assigned="0" Name="Site User" /><UserLevel ID="10" Assigned="0" Name="Auditor" /><UserLevel ID="11" Assigned="0" Name="Viewer" /><UserLevel
ID="12" Assigned="0" Name="Spirometry Over-Reader" /><UserLevel ID="14" Assigned="0" Name="BS-Bug 939(Name Issue with subject Permissions in CRF )" /><UserLevel ID="16" Assigned="0" Name="new test user group" /><UserLevel ID="17" Assigned="0"
Name="usergroup_1" /><UserLevel ID="18" Assigned="0" Name="userGroup_2Edit" /><UserLevel ID="19" Assigned="0" Name="userGroup_3viewdeleted" /><UserLevel ID="20" Assigned="0" Name="UserGroup_SubjectEdit" /><UserLevel ID="21" Assigned="0"
Name="userGroup_Delete_withoutRestore" /><UserLevel ID="22" Assigned="0" Name="Group_Query" /><UserLevel ID="23" Assigned="0" Name="userGroup_ViewUser" /><UserLevel ID="24" Assigned="0" Name="TEst Group" /></Protocol</root>
<p style="background-color:white <span style="font-size:9.0pt; font-family:Verdana; color:black
<p style="background-color:white <span style="font-size:9.0pt; font-family:Verdana; color:black
<p style="background-color:white <span style="font-size:9.0pt; font-family:Verdana; color:black @ModifiedXML <span style="font-size:9pt; font-family:Verdana; color:black = <root><Protocol ID="0 <UserLevel ID="1" Assigned="1"
Name="System Administrator" /><UserLevel ID="2" Assigned="1" Name="Configuration Administrator" /><UserLevel ID="3" Assigned="1" Name="Data Manager." /><UserLevel ID="4" Assigned="1" Name="Help Desk" /><UserLevel ID="5" Assigned="1"
Name="Sponsor" /><UserLevel ID="6" Assigned="1" Name="Monitor" /><UserLevel ID="7" Assigned="0" Name="Site Administrator" /><UserLevel ID="8" Assigned="0" Name="Investigator" /><UserLevel ID="9" Assigned="0" Name="Site User" /><UserLevel
ID="10" Assigned="0" Name="Auditor" /><UserLevel ID="11" Assigned="0" Name="Viewer" /><UserLevel ID="12" Assigned="0" Name="Spirometry Over-Reader" /><UserLevel ID="14" Assigned="0" Name="BS-Bug 939(Name Issue with subject Permissions in
CRF )" /><UserLevel ID="16" Assigned="0" Name="new test user group" /><UserLevel ID="17" Assigned="0" Name="usergroup_1" /><UserLevel ID="18" Assigned="0" Name="userGroup_2Edit" /><UserLevel ID="19" Assigned="0" Name="userGroup_3viewdeleted"
/><UserLevel ID="20" Assigned="0" Name="UserGroup_SubjectEdit" /><UserLevel ID="21" Assigned="0" Name="userGroup_Delete_withoutRestore" /><UserLevel ID="22" Assigned="1" Name="Group_Query" /><UserLevel ID="23" Assigned="0" Name="userGroup_ViewUser"
/><UserLevel ID="24" Assigned="0" Name="TEst Group" /></Protocol><Protocol ID="7" Name="993 <UserLevel ID="2" Assigned="0" Name="Configuration Administrator" /><UserLevel ID="3" Assigned="0" Name="Data Manager." /><UserLevel
ID="4" Assigned="0" Name="Help Desk" /><UserLevel ID="5" Assigned="0" Name="Sponsor" /><UserLevel ID="6" Assigned="0" Name="Monitor" /><UserLevel ID="7" Assigned="0" Name="Site Administrator" /><UserLevel ID="8" Assigned="0" Name="Investigator"
/><UserLevel ID="9" Assigned="0" Name="Site User" /><UserLevel ID="10" Assigned="0" Name="Auditor" /><UserLevel ID="11" Assigned="0" Name="Viewer" /><UserLevel ID="12" Assigned="0" Name="Spirometry Over-Reader" /><UserLevel ID="14"
Assigned="0" Name="BS-Bug 939(Name Issue with subject Permissions in CRF )" /><UserLevel ID="16" Assigned="0" Name="new test user group" /><UserLevel ID="17" Assigned="0" Name="usergroup_1" /><UserLevel ID="18" Assigned="0" Name="userGroup_2Edit"
/><UserLevel ID="19" Assigned="0" Name="userGroup_3viewdeleted" /><UserLevel ID="20" Assigned="0" Name="UserGroup_SubjectEdit" /><UserLevel ID="21" Assigned="0" Name="userGroup_Delete_withoutRestore" /><UserLevel ID="22" Assigned="0"
Name="Group_Query" /><UserLevel ID="23" Assigned="0" Name="userGroup_ViewUser" /><UserLevel ID="24" Assigned="0" Name="TEst Group" /></Protocol</root>
<p style="background:white <span style="font-size:9.0pt; font-family:Verdana; color:black As a part of SP update, I need exactly what permissions have been added in<span> @ModifiedXML . Hence difference between two XMLDocuments
doesnt work here. In the follwing examples, ProtocolID doesnt change but Assigned attribute value for UserLevelIDs change.
<p style="background:white <span style="font-size:9.0pt; font-family:Verdana; color:black for ex, This would be the exact output I would be needing. <root><Protocol ID="0 <UserLevel ID="1" Assigned="1" Name="System Administrator" /><UserLevel
ID="2" Assigned="1" Name="Configuration Administrator" /><UserLevel ID="3" Assigned="1" Name="Data Manager." /><UserLevel ID="4" Assigned="1" Name="Help Desk" /><UserLevel ID="5" Assigned="1" Name="Sponsor" /><UserLevel ID="6" Assigned="1"
Name="Monitor" /><root>
<p style="background:white <span style="font-size:9.0pt; font-family:Verdana; color:black
<p style="background:white <span style="font-size:9.0pt; font-family:Verdana; color:black I am not sure how to proceed. Any Ideas?
<p style="background:white <span style="font-size:9.0pt; font-family:Verdana; color:black
<p style="background:white <span style="font-size:9.0pt; font-family:Verdana; color:black Thanks in Advance
<p style="background:white <span style="font-size:9.0pt; font-family:Verdana; color:black Ruben.
View the full article