[jdom-interest] JDom and Java 1.4 problem

Curtis Fornadley curtisf at library.ucla.edu
Thu Jun 13 13:07:23 PDT 2002


Hi
I believe that the JDOM Doc object (in this case a HTML doc) needs a 
JDOM outputter to process  to the Printwriter. i.e. it is not just a 
String that I can send to the PrintWriter

bye

 
On Thu, 13 Jun 2002 13:09:38 -0500 "Nott, Matthias" 
<mnott at vignette.com> wrote:

> off topic, but I made something similar these days - why
> do you use an XMLOutputter to output things you've apparently
> converted to HTML just before? you could perhaps just out.println.
> 
> M
> 
> -----Original Message-----
> From: Curtis Fornadley [mailto:curtisf at library.ucla.edu]
> Sent: Thursday, June 13, 2002 6:35 PM
> To: jdom-interest at jdom.org
> Subject: [jdom-interest] JDom and Java 1.4 problem
> 
> 
> Hi
> I have set Jrun to use Java 1.4.  A program using JDOM now gives this 
> error:
> 
> java.lang.NullPointerException
> 	at org.jdom.output.XMLOutputter.output(XMLOutputter.java:787)
> 
> Here is some code. The XSLTranform runs the error occurs when the 
> outputter is called.
> 
> 	    // get this from a database as XML
> 	    org.jdom.Document jDocXml = 
> 		coreDB.getFullText(strDocID,conn);
> 
> 	    //send this with XSLT to parser to produce HTML
>             XSLTransform xslTransform = new XSLTransform(xsltURL);
>             org.jdom.Document jDocHTML = xslTransform.buildHTML(jDocXml);
> 
>             response.setContentType("text/html; charset=UTF-8");
>             PrintWriter out = new PrintWriter (response.getWriter());
>             try {
>               //org.jdom.Document jDoc = oaiDataProvider.getRecordXML();
>               XMLOutputter outputter = new XMLOutputter("   ", true,
> "UTF-8");
>               outputter.output(jDocHTML, out);
>             } catch (IOException e){
>               System.out.println("GetRecord JDOM IO Except: " + e);
>             }
> 
> Any Ideas?
> bye
> 
> Curtis Fornadley
> 310.206.9782
> Fax: 310.206.5337
> 
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhos
> t.com

Curtis Fornadley
310.206.9782
Fax: 310.206.5337




More information about the jdom-interest mailing list