|Method||It uses object based approach.|
it first loads the entire XML in memory, converts the XML nodes into objects and then starts parsing them.
|It uses event based approach.|
It parses whole XML.
|It uses event based approach.
It doesn't parses whole XML.
|When to use||When validation of XML is required.||When you have large file and you want to parse whole XML.||When XML is short and you don't want to parse whole XML.|