Can't transform XML in an Applet

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mark McKay

    Can't transform XML in an Applet

    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.tra nsform()
    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.Excep tionInInitializ erError

    ....

    Caused by: java.lang.Runti meException: The resource [ XMLEntities.res
    ] could not load: java.net.Malfor medURLException : no protocol:
    XMLEntities.res
    XMLEntities.res java.net.Malfor medURLException : no protocol:
    XMLEntities.res
    at org.apache.xala n.serialize.Cha rInfo.<init>(Ch arInfo.java:241 )
    at org.apache.xala n.serialize.Ser ializerToXML.<c linit>(Serializ erToXML.java:29 2)
    ... 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
Working...