How to parse this XML and store it in Collection

Diddy

New Member
i have to parse it and display it in a asp.net webpageThe output should look like this
uBij8.png
XML\[code\] <results id="10157" objectType="ROS" systemName="Constitutional" comments="" systemStatus="" patientPartyId="158641" providerPartyId="145150" patientEncounterId="17137" updatedBy="C144964.U685" updatedDate="2012-04-28T10:13:40" urn="ROS-Constitutional-PatientRosSystemsType-10157" createdDate="" createdBy="" activeFlag="true"> <symptoms id="10194" systemId="10157" symptomName="Fatigue" updatedBy="C144964.U685" updatedDate="2012-04-28T10:13:19" urn="ROS-Constitutional-Fatigue-PatientSymptomType-10194" createdDate="" createdBy="" activeFlag="true"> <symptomAttributes id="31393" parentId="10194" className="ObjectAttributeTypeImpl" parentClassName="PatientSymptomType" name="Status" value="http://stackoverflow.com/questions/10393624/C" updatedBy="C144964.U685" updatedDate="2012-04-28T10:13:40" createdBy="" createdDate="" urn="cos-ts-CompanyType-144964-ObjectAttributeType-31393" activeFlag="true"/> <symptomAttributes id="31394" parentId="10194" className="ObjectAttributeTypeImpl" parentClassName="PatientSymptomType" name="Comment" value="http://stackoverflow.com/questions/10393624/test123" updatedBy="C144964.U685" updatedDate="2012-04-28T10:13:40" createdBy="" createdDate="" urn="cos-ts-CompanyType-144964-ObjectAttributeType-31394" activeFlag="true"/> </symptoms> <symptoms id="10195" systemId="10157" symptomName="Fever" updatedBy="C144964.U685" updatedDate="2012-04-28T10:13:19" urn="ROS-Constitutional-Fever-PatientSymptomType-10195" createdDate="" createdBy="" activeFlag="true"> <symptomAttributes id="31395" parentId="10195" className="ObjectAttributeTypeImpl" parentClassName="PatientSymptomType" name="Status" value="http://stackoverflow.com/questions/10393624/C" updatedBy="C144964.U685" updatedDate="2012-04-28T10:13:40" createdBy="" createdDate="" urn="cos-ts-CompanyType-144964-ObjectAttributeType-31395" activeFlag="true"/> <symptomAttributes id="31396" parentId="10195" className="ObjectAttributeTypeImpl" parentClassName="PatientSymptomType" name="Comment" value="http://stackoverflow.com/questions/10393624/testing" updatedBy="C144964.U685" updatedDate="2012-04-28T10:13:40" createdBy="" createdDate="" urn="cos-ts-CompanyType-144964-ObjectAttributeType-31396" activeFlag="true"/> </symptoms></results><results>................</results><results>................</results>........ so on\[/code\]This is the xml i got from server.i have to parse this and store it in a collection, i'm not getting any idea how to store it in a collection or something. Because there would be multiple \[code\]results\[/code\] tags and each \[code\]result\[/code\] tag has its own values and sub tagsNormally i parse the response and store it in a \[code\]List<Dictionary<,>>\[/code\] if XML is two level. But here that approach will not work.I have to store it in one variable(List or something) and only some attributes of the \[code\]elements\[/code\] i have to store. like in \[code\]results\[/code\] =>(id,sytemName,comments) in \[code\]symptoms\[/code\] =>(id,symptomName) and in \[code\]symptomAttributes\[/code\] => (name,value)...thanks in advance...
 
Back
Top