Hi I am new to XSLT i want to transform the Xml Dataset where student name is mapped from a xml where there is a dataset of student name and roll no. classwise.
I want to use a xslt but i dont want to add all the tags just the column name tag which is to be mapped and rest other columns as it is.
here is the input and output dataset example. The xml is normal dataset.writexml from c# code.
Table1:
RollNo Sub1 Sub2 Sub3 Sub4
1 65 89 67 34
2 67 86 67 76
3 86 67 78 45
4 56 56 87 56
5 76 56 56 78
Table2
Name Sub1 Sub2 Sub3 Sub4
Aman 65 89 67 34
Ankit 67 86 67 76
Om 86 67 78 45
Narendra 56 56 87 56
Faisal 76 56 56 78
This is the Xml to be used for transformation
<?xml version="1.0" standalone="yes"?>
<School>
<Class Name="Class1">
<StudentData Name="Aman" RollNo="1" />
<StudentData Name="Ankit" RollNo="2" />
<StudentData Name="Om" RollNo="3" />
<StudentData Name="Narendra" RollNo="4" />
<StudentData Name="Faisal" RollNo="5" />
</Class>
<Class Name="Class2">
<StudentData Name="Abhinav" RollNo="1" />
<StudentData Name="Abhishek" RollNo="2" />
<StudentData Name="Ishaan" RollNo="3" />
<StudentData Name="Mayank" RollNo="4" />
<StudentData Name="Bhavana" RollNo="5" />
</Class>
</School>
Thanks Aman
No comments:
Post a Comment