Results 1 to 2 of 2

Thread: manipulating an XML

Threaded View

  1. #1

    Thread Starter
    Junior Member
    Join Date
    May 2007
    Posts
    26

    manipulating an XML

    <?xml version="1.0" ?>
    - <Aparate>
    - <Aparat>
    <Denumire>AF MARINCA SAECO 1P</Denumire>
    <NumarCitire>156</NumarCitire>
    <DataCitire>31.10.2007</DataCitire>
    <ContorGeneralInitial>817</ContorGeneralInitial>
    <ContorGeneralFinal />
    - <Pozitii>
    - <Pozitie>
    <Produs>Cafea espress</Produs>
    <ContorInitial>817</ContorInitial>
    <ContorFinal />
    </Pozitie>
    - <Pozitie>
    <Produs>Cafea cu lapte</Produs>
    <ContorInitial>317</ContorInitial>
    <ContorFinal />
    </Pozitie>
    </Pozitii>
    <Denumire>LAVAZZA</Denumire>
    <NumarCitire>112</NumarCitire>
    <DataCitire>31.10.2007</DataCitire>
    <ContorGeneralInitial>144</ContorGeneralInitial>
    <ContorGeneralFinal />
    - <Pozitii>
    - <Pozitie>
    <Produs>Cafea espress</Produs>
    <ContorInitial>817</ContorInitial>
    <ContorFinal />
    </Pozitie>
    - <Pozitie>
    <Produs>Cafea cu lapte</Produs>
    <ContorInitial>317</ContorInitial>
    <ContorFinal />
    </Pozitie>
    - <Pozitie>
    <Produs>Capucino</Produs>
    <ContorInitial>123</ContorInitial>
    <ContorFinal />
    </Pozitie>
    </Pozitii>
    </Aparat>
    </Aparate>

    i put in a combo Denumire.So i have 2 items in the combo
    Now,how can i ,when i select from the combo one of the 2 itmes,put in a grid the right data?

    the code i use to insert items in combo is this
    XmlDocument xd = new XmlDocument();
    xd.Load("contor.xml");
    XmlNodeList xnd = xd.SelectNodes(@"Aparate/Aparat/Denumire");
    foreach (XmlNode xn in xnd)
    {
    string sDenumire = xn.InnerText;
    this.comboBox1.Items.Add(sDenumire);
    }
    Last edited by King Abadon; May 15th, 2007 at 04:32 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width