All code online would be according to your defination, "static"
This is because usually a parser has an idea about the grammar
The apis mentioned will allow you to access the elements of an xml file
so say, you have the following:
When you parse this with SAX,
you will come across document start eg: root
and for every tag, you will read the element start eg: name/userId
then you will read the chars within it eg: "salvin" / "java"
Now its up to you to write logic for them.
Without logic, its only known that A contains B.