Assuming the goal of parsing an XML document is to only use parts of it based upon certain multiple relational data criteria, but the document is very large, is it advisable to use SAX to run through the XML document first to select and create another, smaller, XML file, then pushing that result through DOM for the ultimate outcome? Or, should there be the output of another type of file and a function built with a programming language used for the second part?