Itzy wrote: » Would it not be easier to keep your code as is and manipulate the XPath file as needed, should the XML file change?
IamtheWalrus wrote: » My question is, what is fastest: 1. Parse and save the entire list into Java objects, then filter out A and B 2. Use XPath to exclude A and B.
CreepingDeath wrote: » There's also an option 3, to use XSLT stylesheets to transform the original XML into one specific for your code, performing any business filtering of elements in the stylesheet. Especially if you are not in control of the structure of the XML, eg. it's from a client/third party.
IamtheWalrus wrote: » I can't use anything other than XPath and Java. The existing code uses those to parse the existing XML. My job is to filter out one part of it. I will not be re-writing the existing code.