I'm trying to send XML messages over a socket to a server I've
written. At the moment, I'm using the default DOM utilities to create
DOM trees and then try to translate them to strings, which I would
then send. I'm trying to do this with the Transformer.transform()
method, passing in a DOMSource and a StreamResult, with the
StreamResult wrapping a StreamWriter. While this works fine when I'm
running this sort of code as an application, when put in an applet, I
get:
java.lang.ExceptionInInitializerError
....
Caused by: java.lang.RuntimeException: The resource [ XMLEntities.res
] could not load: java.net.MalformedURLException: no protocol:
XMLEntities.res
XMLEntities.res java.net.MalformedURLException: no protocol:
XMLEntities.res
at org.apache.xalan.serialize.CharInfo.<init>(CharInf o.java:241)
at org.apache.xalan.serialize.SerializerToXML.<clinit >(SerializerToXML.java:292)
... 30 more
I have no idea what to do about this. Transformation from DOM to DOM
seems to go well. I get it from both the Applet Viewer and Mozilla.
Can applets make this transformation? Where can I find this missing
file?
Mark McKay