Why are you putting a forward slash before double quotes? (\") -----Original Message----- From: Peter Palombi [mailto:[EMAIL PROTECTED]] Sent: Saturday, December 08, 2001 8:52 PM To: [EMAIL PROTECTED] Subject: JSP and (XML/HTML)
Hi all, I need to made a parsing of a HTML page to extract same value in a table. I have thought to use URLConnection to read the page html and insert the html code in one String for example String str = \"<table><tr><td>VAL</td></tr></table>\"; and now use a XML parser to extract the \"VAL\"! I don�t know if it�s a good idea? I have tried to made this code but i have now some troble with xml parser!! I use JRUN 3.0 and i have read some example to use XML parser .. but i think i need some jar to include in my CLASSPATH!! In a FAQ i have read to include jaxp.jar and parser.jar in the classpath .. and i have made this. I have tried to made a very easy example : <%@ page language=\"java\" import=\"org.w3c.dom.*,org.xml.sax.*, javax.xml.parsers.SAXParserFactory , javax.xml.parsers.SAXParser , java.lang.System, java.net.URL, java.net.URLConnection,java.net.URLEncoder,java.net.Malf ormedURLException, java.net.UnknownServiceException, java.io.*\"%> <html><body> <% String xmlResource = \"file:\"+new FILE(filename); String urlstring = \"http://127.0.0.1:8000\"; SAXParserFactory spf = SAXParserFactory.newInstance(); SAXParser sp = spf.newSAXParser(); SAXHandler handler = new SAXHandler(); sp.parse(xmlResource,handler); but the errors are can�t found org.xml.sax.* than Parser method don�t found and can�t found tha method parse in the java.lang.String I don�t know where is the error.. Thanks for the help Peter ----------------------------------------------------- This mail sent through IMP: http://web.horde.org/imp/ =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com ==========================================================================To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
