Hi,
    I have just started XML and am writing an app using the Xerces 2 parser. However, when I perform a SAX Parse on an XML file I get a 'null error on parsing'. What i going wrong. Are there any good tutorials / documentation on using the Xerces parser?
Angus.
 
-----Original Message-----
From: Vikram Manchepalli [mailto:[EMAIL PROTECTED]
Sent: 21 March 2001 17:01
To: [EMAIL PROTECTED]
Subject: Re: Xalan

Hi,

Hi i dont know what iPlanet is .... but i think i can help u . i have a code with servlet that does the same thing like the standalone( i understand at the command prompt) where u specify the xml and xsl and output.. the code snippet for servlet is as follows
 

I GUESS IT MIGHT HELP YOU. HAVE A NICE DAY

bye,

vikram

 

 

CODE FOR TRANSFORM1.JAVA

 

import java.io.*;

import javax.servlet.*;

import javax.servlet.http.*;

 

import org.xml.sax.SAXException;

import org.apache.xalan.xslt.XSLTProcessorFactory;

import org.apache.xalan.xslt.XSLTInputSource;

import org.apache.xalan.xslt.XSLTResultTarget;

import org.apache.xalan.xslt.XSLTProcessor;

 

public class Transform1 extends HttpServlet {

 

      public void doGet (HttpServletRequest req, HttpServletResponse resp) throws

            ServletException, IOException {

           

            resp.setContentType("text/html");

 

            ServletOutputStream out = resp.getOutputStream();

            try{

                        // Have the XSLTProcessorFactory obtain a interface to a

                        // new XSLTProcessor object.

                  XSLTProcessor processor = XSLTProcessorFactory.getProcessor();

           

                  processor.process(new XSLTInputSource("/home/manch_v/tomcat/jakarta-tomcat-3.2.1/webapps/examples/WEB-INF/classes/contents.xml"),

                                new XSLTInputSource("/home/manch_v/tomcat/jakarta-tomcat-3.2.1/webapps/examples/WEB-INF/classes/JavaXML.html.xsl"),

                                new XSLTResultTarget(out));

            }catch(Exception ex){

              out.println("Manche");}

            out.close();

 

      }//end doGet

 

}// end class

 

 

 

----Original Message Follows----
From: "Nick Makris" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: <[EMAIL PROTECTED]>
Subject: Xalan
Date: Tue, 21 Mar 2000 13:14:35 +0200
I use Xalan as XSLT processor in a stand alone program. It works fine
When i use the exact same code in a servlet then the results are not the
expected ones.
Can anybody help me please. (i use iPlanet 4.1 for web server on solaris)


Get your FREE download of MSN Explorer at http://explorer.msn.com

Reply via email to