• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
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();
pr.setProperty(OutputKeys.ENCODING,"GB2312");
pr.setProperty(OutputKeys.INDENT,"yes");
tr.setOutputProperties(pr);
tr.transform(doms,sr);
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!!
thanks
 
A sonic boom would certainly ruin a giant souffle. But this tiny ad would protect it:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic