Restructured XmlSpecParser to be 3 stages instead of 2.