How to Update the different XML Element Simultaneously by Multiple User in single XML File (Like SQL

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hi All,
I have one XML File . <?xml version="1.0" encoding="utf-8" standalone="yes"?>
<NewDataSet>
<xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata
<xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded
<xs:element name="UsersPreferenceSettingsDT
<xs:complexType>
<xs:sequence>
<xs:element name="USERPROFILEID" type="xs:int" minOccurs="0" />
<xs:element name="SCREENAMEID" type="xs:int" minOccurs="0" />
<xs:element name="FREEZEDCOLUMNID" type="xs:string" minOccurs="0" />
<xs:element name="ORDEROFCOLUMNS" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
<UsersPreferenceSettingsDT>
<USERPROFILEID>219</USERPROFILEID>
<SCREENAMEID>1</SCREENAMEID>
<FREEZEDCOLUMNID>2|3|4|5</FREEZEDCOLUMNID>
<ORDEROFCOLUMNS>1</ORDEROFCOLUMNS>
</UsersPreferenceSettingsDT>
<UsersPreferenceSettingsDT>
<USERPROFILEID>123</USERPROFILEID>
<SCREENAMEID></SCREENAMEID>
<FREEZEDCOLUMNID>s|s|s</FREEZEDCOLUMNID>
<ORDEROFCOLUMNS></ORDEROFCOLUMNS>
</UsersPreferenceSettingsDT>
</NewDataSet>
In that i have to update the XML Element (i,e USERPROFILeID =219, USERPROFILEID is Unique). At same time another user also update the same XML file but different XML elemnet (i,e USERPROFILEID=123). How can the XML reflect the both users XML update(Like SQL or ORACLE DB Update).I used the following code to update. userPreferenceSettingsDS.WriteXml(userPreferenceSettingsXMLFilePath, XmlWriteMode.WriteSchema);

but it reflect the last user profile update Value only , while multiple user simultaneously update the XML. Anyone guide me to come out of these issue?
Manikandan Murugeshan

View the full article
 
Back
Top