Hello, I got an OutOfMemory when I evaluate an XPATH expression a large XML file.
I am using this code: XPathFactory factory = XPathFactory.newInstance(); XPath xpath = factory.newXPath(); InputSource entities_is=new InputSource("file.xml"); XPathExpression xpathExpr = xpath.compile(expr); return (NodeList)xpathExpr.evaluate(entities_is, XPathConstants.NODESET); I am not an expert of XPATH development, therefore I'd appreciate if someone could give me an explanation of why is this error happening. Is this because XPATH uses DOM internaly? If so, is there any implementation for XPATH for SAX? Is there any other explanation/solution? Thanks in advance for your help. -Enric