Updating from 3.0.23 to 3.2.0 causes the following exception.  Any
pointers appreciated.

Error in OutputDom : com.caucho.xsl.TransformerExceptionWrapper:
com.caucho.vfs.IOExceptionWrapper: java.lang.ClassCastException:
org.apache.xerces.dom.AttrImpl cannot be cast to
com.caucho.xml.QAbstractNode

Code goes something like this.

private static DocumentBuilder s_DocumentBuilder = null;
private static com.caucho.xsl.Xsl s_TransformerFactory = null;
...
        public void OutputDom(Document doc, String outFile)
        {
                org.apache.xml.serialize.OutputFormat MyOutputFormat;
                XMLSerializer MySerializer;
                FileOutputStream OutputXML;

                try
                {
                        //  Save Output XML Document by creating an
output stream, an
                        //  XMLSerializer, assigning the output stream
to the serializer, and
                        //  setting the serializer to be a DOM
serializer
                        OutputXML = new FileOutputStream(outFile);
                        MySerializer = new XMLSerializer();
                        MySerializer.setOutputByteStream(OutputXML);
                        MySerializer.asDOMSerializer();
                        //  Create the Output Format for the Serializer
for
                        //    XML, UTF-8, and indentation true
                        MyOutputFormat = new
org.apache.xml.serialize.OutputFormat("XML", "UTF-8", true);
                        MySerializer.setOutputFormat(MyOutputFormat);
                        //  Write out the document, and close the output
stream
                        MySerializer.serialize(doc);
                        OutputXML.flush();
                        OutputXML.close();
                }

                catch (Exception e)
                {
                        System.err.println("Error in OutputDom : " +
e.toString());
                }
        }

Tom


_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to