Querying an HTML page with XPath in Java
问题 Can anyone advise me a library for Java that allows me to perform an XPath Query over an html page? I tried using JAXP but it keeps giving me a strange error that I cannot seem to fix (thread "main" java.io.IOException: Server returned HTTP response code: 503 for URL: http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd). Thank you very much. EDIT I found this: // Create a new SAX Parser factory SAXParserFactory factory = SAXParserFactory.newInstance(); // Turn on validation factory