Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XML
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old September 6th, 2003, 02:15 AM
Registered User
Join Date: Sep 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem writing xml file using DOM

I am trying to write a xml file using DOM. I am using xalan 2.5, xerces 1.4.4, jdk 1.3.1 in JRun 3 on windows.
The code where I get exception :
TransformerFactory tFactory = TransformerFactory.newInstance();
Transformer transformer = tFactory.newTransformer();
transformer.transform(new DOMSource(doc), new StreamResult("pr.xml"));

I get the runtime error as follows:
javax.servlet.ServletException: null
at org.apache.xml.utils.DOM2Helper.getNamespaceOfNode DOM2Helper.java:342)
at org.apache.xml.utils.TreeWalker.startNode(TreeWalk er.java:387)
at org.apache.xml.utils.TreeWalker.traverse(TreeWalke r.java:202)
at org.apache.xalan.transformer.TransformerIdentityIm pl.transform(TransformerIdentityImpl.java:343)

Thinking it is because of classpath, I placed xalan 2.5, xerces 1.4.4 jar files in jrun admin lib directory and in server lib directory as well. Still getting the same error.

Any suggestion?

Thanks in advance


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem in writing anything within "" by XML DOM. Somesh XML 0 March 5th, 2007 07:45 AM
Problem in writing within "" by DOM. Somesh XSLT 1 March 5th, 2007 07:27 AM
Problem in writing anything within "" by XML DOM. Somesh C# 0 March 5th, 2007 07:08 AM
How to save XML file using JScript/DOM in IE induriprakash XML 2 April 26th, 2005 07:37 AM
parse xml file with Xerces-C_2_5_0 ,DOM taianmhzy XML 0 May 27th, 2004 04:14 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.