Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

a stange problem when transform a document to xml file?plz  RSS feed

jianlong chen
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a dom which parsed from a xml file, now I want to transform it xml file ,the following is my source code:
import org.w3c.dom.*;
import javax.xml.transform.*;
import javax.xml.transform.dom.*;
DOMSource doms=new DOMSource(dom);
File f=new File(file);
StreamResult sr=new StreamResult(f);
TransformerFactory tff =TransformerFactory.newInstance();
Transformer tr=tff.newTransformer();
Properties pr=tr.getOutputProperties();
it will throw a exception when I run it:
javax.xml.transform.TransformerFactoryConfigurationError: Provider org.apache.xalan.processor.TransformerFactoryImpl not found
at javax.xml.transform.TransformerFactory.newInstance(Unknown Source)

what's the matter? pleas help me!!
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!