This is general java (xmlparser) related question , my question is i have a XSLT file that transforms a separate XML file . after my test fnished following code is applying , but relevant XSLT file didnt import to relevant XML successfully , i appriciate if you can mention any similar code or suggetion , my code is ..
public static void Xmlparser() throws TransformerException
{
try{
Source source = new StreamSource("myxml.xml");
Source xsl = new StreamSource("myxslt.xslt");
Result result = new StreamResult(System.out);
ERROR: 'D:\Aftersales_Automation\target\surefire-reports\cdcatalog.xsl (The system cannot find the file specified)'
FATAL ERROR: 'Could not compile stylesheet'
cannot transform
javax.xml.transform.TransformerConfigurationException: Could not compile stylesheet
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:824)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:619)
at com.ebuilder.core.Util.Xmlparser(Util.java:210)
at com.ebuilder.core.Executor$1.oneTimeTearDown(Executor.java:91)
at com.ebuilder.core.Executor$1.tearDown(Executor.java:95)
at junit.extensions.TestSetup$1.protect(TestSetup.java:24)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.extensions.TestSetup.run(TestSetup.java:27)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
at