Hi Minal
 
Could it be that you are writing an applet and creating an XMLWriter that writes to a local file? Applets generally can't write to local files unless they're signed. You could try this instead...
 
StringWriter buffer = new StirngWriter();
XMLWriter writer = new XMLWriter( buffer );
writer.write( document );
String text = buffer.toString();
 
If the above works then the problem you were having was caused by you not being allowed to write to files in the sandbox where you ware.
 
BTW the above could be simplified as either
 
StringWriter buffer = new StirngWriter();
document.write( buffer );
 
or
 
String text = document.asXML();

James
----- Original Message -----
Sent: Monday, July 26, 1999 8:24 PM
Subject: [dom4j-user] (no subject)

Hi All,
 
I have just downloaded the dom4j package and am trying to run the Creating an Xml Document example in the Quickstart guide.After the document is created I tried to ouput the Document as an Xml file .The code compiles perfectly ,however at run time I get a java.lang.SecurityException:sealing violation error.
 
The exception points to the location where I create an XMLWriter object.
 
I would be thankful if anyone could help me out with this error.
 
Minal Ashar
Zenith Infotech Ltd.
 
 
 

Reply via email to