dcsimg
XML-Exception??
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Fredrik_Andersson
Posted On:   Monday, November 26, 2001 06:31 AM

Hello! I run this method: public String getDocumentAsString(boolean includeInternalDTD) throws IOException, LibraryException { StringWriter sw = new StringWriter(); ((TXDocument)_document).setPrintInternalDTD(includeInternalDTD); ((TXDocument)_document).printWithFormat(sw); return(sw.toString()); } And get this error: com.ibm.xml.parser.LibraryException: com.ibm.xml.parser.TXDocument#printWithForm at(): Unexpected Exception: java.lang.NullPointerException at com.ibm.xml.parser.TXDocument.printWithFormat(TXDocument.java) at com.ibm.xml.parser.TXDocument.printWithFormat(TXDocument.java) at com.my.test.xml.XM   More>>

Hello!



I run this method:

public String getDocumentAsString(boolean includeInternalDTD) throws IOException, LibraryException
{
StringWriter sw = new StringWriter();
((TXDocument)_document).setPrintInternalDTD(includeInternalDTD);
((TXDocument)_document).printWithFormat(sw);

return(sw.toString());
}



And get this error:


com.ibm.xml.parser.LibraryException: com.ibm.xml.parser.TXDocument#printWithForm
at(): Unexpected Exception: java.lang.NullPointerException
at com.ibm.xml.parser.TXDocument.printWithFormat(TXDocument.java)
at com.ibm.xml.parser.TXDocument.printWithFormat(TXDocument.java)
at com.my.test.xml.XMLCompiler.getDocumentAsString(XMLCompil
er.java:294)



Does any one know why?


Best regards


Fredrik

   <<Less

The problem were a nullpointer inside the _document.!_NEWLINE_!!_NEWLINE_!/Stupido-me ;-)

Posted By:   Fredrik_Andersson  
Posted On:   Monday, November 26, 2001 07:36 AM

The problem were a nullpointer inside the _document.

/Stupido-me ;-)
About | Sitemap | Contact