Hey everyone,

I've got a problem. Say I've got two xml files, a student file and a class file. The class file displays all the students in a class;
eg-

<Class>
    <Student> a </Student>
    <Student> b </Student>
    <Student> c </Student>
</Class>

And the student file stores the details of the student;
eg-

<Students>
    <Student id = "a"> 
      <Name>*** </Name>
      <Age>*** </Age>
    </Student>
</Students>

So can I read the student "a" from the Class file and then read the details of that student from the Student file and display? Any help would be much appreciated.

Recommended Answers

All 3 Replies

There's got to be a way, any one??

There are a couple of different ways to do what you're asking. Are you familiar with XPath?

Try LINQ TO XML API instead.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.