Hello:

I want to process a XML document that I obtain from an URL and keep in a string 
variable. I don't want
to use any XSLT processing since I haven't had good experience with it for complicated 
processing. 
I want to use something like following:

<%@ page import="javax.xml.parsers.*" %>
<%@ page import="org.w3c.dom.*" %>
<%@ page import="org.xml.sax.*" %>
<%@ page import="java.io.*" %> 
<%
        // _xml_string is the variable which contains an xml document as a string.
        DocumentBuilderFactory docBuilderFact = DocumentBuilderFactory.newInstance();
        DocumentBuilder docBuilder = docBuilderFact.newDocumentBuilder();
        Document doc = null;
        doc = docBuilder.parse(_xml_string);        
        
       //Then get needed data from the xml using things like 
       //doc.getElementsByTagName("whatever");      
%>

The problem is that when execution gets to the line 
         doc = docBuilder.parse(_xml_string);        

I get a 404 error in my browser.
Any idea of why is this ocurring? Any better ways of doing what I'm trying to do?

Thanks a lot for your help,
Julia

==========================================================================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

Reply via email to