Link to home
Start Free TrialLog in
Avatar of beos1907
beos1907

asked on

How to access this data ( XML, C# Deserialize )

I need to deserialize this xml file. And access the value using C#..

the value i want to access is

<Image Kdf=\"PRgo=\" />

thanks
so far what i have 
 
 XmlReaderSettings settings = new XmlReaderSettings();
            XmlSerializer serializer2 = new XmlSerializer(typeof(ISOReponsesType1));
            System.IO.StringReader stringReader2 = new System.IO.StringReader(myString);
            XmlReader xmlReader2 = XmlReader.Create(stringReader2, settings);
            ISOReponsesType1 svcResp = (ISOReponsesType1)serializer2.Deserialize(xmlReader2);
 
 
            ReportsType report = (ReportsType)svcResp.Items[1];
 
 
            string myText = "";
            ResponsesType responses = (ResponsesType)report.Responses;
 
            ....
 
we also have a wrapper class

Open in new window

Avatar of beos1907
beos1907

ASKER

also we have a wrapper class
public partial class ResponseType
{
    private ReportType report2Field;
    private object itemField;
 
    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute("ErrorReturn", typeof(ErrorReturn))]
    [System.Xml.Serialization.XmlElementAttribute("Report", typeof(RepCostReportType), Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    [System.Xml.Serialization.XmlElementAttribute("root", typeof(HomeValueErrorsType), Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public object Item
    {
        get
        {
            return this.itemField;
        }
        set
        {
            this.itemField = value;
        }
    }
 
etc.. 

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Vivek Thangaswamy
Vivek Thangaswamy
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi beos1907,
Is my solution helped you?