62071072SP
62071072SP

Reputation: 1935

Treeview and list view control

I have following sample xml file

   <?xml version="1.0" encoding="utf-8" standalone="yes"?>

   <IResponse   xmlns:xsi="http://www.w3.org/2001/XMLScheminstance"                            xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <Language>en</Language>
   <Code>Approved</Code>
   <Message> Approved</Message>
   <Info xsi:type="Info">
   <Number>11</Number>
   <ExpiryDate year="10" month="8" />
   <StartDate year="7" month="8" />
   <currency="GBP">36.00</currency>

  <ACode>096392</ACode>
  </IResponse>

How to display the nodes and child elemants in treeview control and values in the list view?

     public void Deserialize()
    {
        XmlReader reader = XmlReader.Create(this.filePath);
        XmlSerializer serializer = new XmlSerializer(typeof(Response));
        if (serializer.CanDeserialize(reader))
        {
            Response obj = serializer.Deserialize(reader) as Response;

          // obj consists of xml file nodes and i want to display this in treeview
            // control and values in between them as list view .
        }
        else
        {
            iccTransactionResponseBindingSource.DataSource = null;
        }

    }

Upvotes: 0

Views: 481

Answers (1)

Wayne In Yak
Wayne In Yak

Reputation: 546

Maybe this MS KB document? http://support.microsoft.com/kb/317597

Upvotes: 2

Related Questions