Win a copy of Transfer Learning for Natural Language Processing (MEAP) this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • salvin francis
  • Carey Brown
  • Frits Walraven

plz, stange problem when transfrom document to xml file with jaxp

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!!
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to put xalan.jar in your classpath if you are using j2sdk1.4.0 or lower.
I like tacos! And this tiny ad:
Two software engineers solve most of the world's problems in one K&R sized book
    Bookmark Topic Watch Topic
  • New Topic