0

I followed this simple tutorial and created a nested repeater. This tutorial is simple enough so i could easily create something like that.

But I have different XML structure in my organisation which i can't change. My XML structure is repeated structure of this.

    <pupil>
    <academicYear>2011/2010</academicYear>
    <grade>Kindergarten 1</grade>
    <class>class 1</class>    
    <name>emma</name>
    <admissionDate>01/05/2010</admissionDate>
    <language>English</language>
    <CountryofBirth>United Kingdom</CountryofBirth>
    <fullName>emma watson</fullName>
    </pupil>

I would like to see academicYear, grade, class, name, admissiondate, etc As Titles. And below each title, there should be coresponding data about it.

Eg.

    *Academic Year
      -2011/2010
      -2010/2009
    *Grade
      -kingdergarten1
      -kingdergarten2
      -kingdergarten3

I don't post all my code again coz it's same as in this tutorial. Please don't tell me why don't u go and ask the guy who made that tutorial. I found people here are very nice and always helpful. Thanks so much.

Oded
  • 489,969
  • 99
  • 883
  • 1,009
Laurence
  • 7,633
  • 21
  • 78
  • 129

1 Answers1

1

Having looked at the tutorial and your XML, the big difference between your XML and the example given on the tutorial is that yours isn't nested XML.

I'd also dispute your assertion that you cannot change the XML structure. Sure, you might not be able to change what you get from the service that is providing you with the XML, but there is no reason why you couldn't reorganise the XML you are receiving into a nested XML document that is more compliant with your intentions.

Paul Alan Taylor
  • 10,474
  • 1
  • 26
  • 42
  • Thanks for your comment, I think u r quite right, that's two different XML structure. But i am not sure or i don't know how i can convert the existing xml structure to nested xml. I have to say i am quite new to those things so. – Laurence Jan 17 '12 at 08:56