Vikas Ahlawat

Vikas Ahlawat

  • NA
  • 564
  • 818k

XML Problem

Jul 18 2011 1:46 AM
I have the following xml

 <Category ID="8">
  <Name>naveen</Name>
  <Images>
  <Imagepath>Desert.jpg</Imagepath>
  <Imagepath>Koala.jpg</Imagepath>
  <Imagepath>Tulips.jpg</Imagepath>
  <Imagepath>Penguins.jpg</Imagepath>
  <Imagepath>Lighthouse.jpg</Imagepath>
  <Imagepath>Jellyfish.jpg</Imagepath>
  </Images>
  <ThumImages>
  <Imagepath>Desert_Thumb.jpg</Imagepath>
  <Imagepath>Koala_Thumb.jpg</Imagepath>
  <Imagepath>Tulips_Thumb.jpg</Imagepath>
  <Imagepath>Penguins_Thumb.jpg</Imagepath>
  <Imagepath>Lighthouse_Thumb.jpg</Imagepath>
  <Imagepath>Jellyfish_Thumb.jpg</Imagepath>
  </ThumImages>
  </Category>


When I read it using readxml then I got 5 tables in dataset. and relation automatically created.
I want to bind thumImages to reapeter how can id do this.

  string xmlFile = System.Web.HttpContext.Current.Server.MapPath("~/XML Database/uploadimages.xml");

  DataSet ds = new DataSet();
  ds.ReadXml(xmlFile);
  Reapeter1.datasource = ????????????
  Reapeter1.databind();

Answers (7)