当前位置: 技术问答>java相关
关于用java写xml转换器的问题
来源: 互联网 发布时间:2015-05-24
本文导语: 我用jaxp: TransformerFactory at=TransformerFactory.newInstance(); Transformer tr=at.newTransformer(new SteamSource(s));//s是一个xsl文件 tr.transform(new StreamSource(new StringReader(xmlFileName)),new StreamResult(new FileOutputStream(name))); 在用JA...
我用jaxp:
TransformerFactory at=TransformerFactory.newInstance();
Transformer tr=at.newTransformer(new SteamSource(s));//s是一个xsl文件
tr.transform(new StreamSource(new StringReader(xmlFileName)),new StreamResult(new FileOutputStream(name)));
在用JAVAC编译时通过,在执行时发生问题:
Exception in thread "main"java.lang.NoClassDefFoundError:org/w3c/dom/Node
at ......
at......
希望高手指导!谢谢!!!!
TransformerFactory at=TransformerFactory.newInstance();
Transformer tr=at.newTransformer(new SteamSource(s));//s是一个xsl文件
tr.transform(new StreamSource(new StringReader(xmlFileName)),new StreamResult(new FileOutputStream(name)));
在用JAVAC编译时通过,在执行时发生问题:
Exception in thread "main"java.lang.NoClassDefFoundError:org/w3c/dom/Node
at ......
at......
希望高手指导!谢谢!!!!
|
没有在你的classpath中找到org.w3c.dom.Node