Hi, I have a list which contains student objects as shown below:
It symbolises a XML heirarchy.
Now I plan to add another entry into the list/xml based on the school of individual student.
For eg: I want to search through the list mentioned above, for school = "Berlin" and then add another new student if there is a match.
For eg:
Ofcourse, I change he FirstName and Gender .. Please suggest me how to scan through the object properties inside list of objects?
Java:
Registry(Student=[Student(Gender=M, School=Hamburg, FirstName=RP, Value=null), Student(Gender=F, School=Berlin, FirstName=SK, Value=null), Student(Gender=M, School=Frankfurt, FirstName=TK, Value=null)])
It symbolises a XML heirarchy.
XML:
<Registry
<Student Gender="M" School="Hamburg">
<FirstName>RP</FirstName>
</Student>
<Student Gender="F" School="Berlin">
<FirstName>SK</FirstName>
</Student>
<Student Gender="M" School="Frankfurt">
<FirstName>TK</FirstName>
</Student>
</Registry>
Now I plan to add another entry into the list/xml based on the school of individual student.
For eg: I want to search through the list mentioned above, for school = "Berlin" and then add another new student if there is a match.
For eg:
Java:
Registry(Student=[Student(Gender=M, School=Hamburg, FirstName=RP, Value=null), Student(Gender=F, School=Berlin, FirstName=SK, Value=null),Student(Gender=M, School=Berlin, FirstName=KK, Value=null), Student(Gender=M, School=Frankfurt, FirstName=TK, Value=null)])
Ofcourse, I change he FirstName and Gender .. Please suggest me how to scan through the object properties inside list of objects?