I am trying to write a Document object to XML file using FileOutputStrea m. But I am getting the following runtime error. ( No other compilation error).
Exception in thread "main" java.lang.Class NotFoundExcepti on: org.apache.xerc es.dom.DOMImple mentationSource Impl
Here is my code, I try to write in XML file.
//doc is Document object returning from a method.
DOMImplementati onRegistry registry = DOMImplementati onRegistry.newI nstance();
DOMImplementati on impl = registry.getDOM Implementation( "XML 1.0 LS 3.0");
if (impl != null) {
DOMImplementati onLS implls = (DOMImplementat ionLS) impl;
LSSerializer serializer = implls.createLS Serializer();
LSOutput output = implls.createLS Output();
output.setByteS tream(new FileOutputStrea m("new_baskar.x ml"));
serializer.writ e(doc, output);
}
Where the so and so class is gone ?
Exception in thread "main" java.lang.Class NotFoundExcepti on: org.apache.xerc es.dom.DOMImple mentationSource Impl
Here is my code, I try to write in XML file.
//doc is Document object returning from a method.
DOMImplementati onRegistry registry = DOMImplementati onRegistry.newI nstance();
DOMImplementati on impl = registry.getDOM Implementation( "XML 1.0 LS 3.0");
if (impl != null) {
DOMImplementati onLS implls = (DOMImplementat ionLS) impl;
LSSerializer serializer = implls.createLS Serializer();
LSOutput output = implls.createLS Output();
output.setByteS tream(new FileOutputStrea m("new_baskar.x ml"));
serializer.writ e(doc, output);
}
Where the so and so class is gone ?
Comment