Pull parsing
. A programming model inner which a product calls methods on a xml parser while requires to have association with a xml archive is referred to as pull-parsing.
Advantages of Pull Parsing:XMLEventReader Class
give iterator of occasions which can be utilized to repeat over occasions as they happen while parsing the XML report.
The XMLStreamReader Class
give iterator of occasions which can be utilized to emphasize over occasions as they happen while parsing the XML report.
Output :
[java]
Start Element : student
Roll No : 393
First Name: John
Last Name: Mike
Nick Name: Jom
Marks: 85
End Element : student
Start Element : student
Roll No : 493
First Name: Rafeal
Last Name: Nadal
Nick Name: Rafa
Marks: 95
End Element : student
Start Element : student
Roll No : 593
First Name: Samuel
Last Name: Johnson
Nick Name: Sam
Marks: 90
End Element : student
[/java]