Transformation fichier XML
Bonjour,
j'utilise le code ci dessous pour faire une transformation xml vers xml par un fichier xslt cependant j'ai l'erreur suivante : Null Pointer in Method Invocation
Code:
1 2 3 4 5 6 7 8
|
Source xmlSource = new StreamSource("xmlFile.xml");
Source xsltSource = new StreamSource("xsltFile.xslt");
Result xmlResult = new StreamResult("xmlConvert.xml");
TransformerFactory transFact = TransformerFactory.newInstance();
Transformer trans = transFact.newTransformer(xsltSource);
trans.transform(xmlSource, xmlResult ); |
avec les imports :
Code:
1 2 3
|
import javax.xml.transform.stream.*;
import javax.xml.transform.*; |
d'où cela peut-il provenir ? Merci.