Hello,

J'ai un InputSource (org.xml.sax). Je le modifie avec XPath. Ensuite, je voudrais le stocker, c'est à dire enregistrer son contenu dans un fichier XML... Est-ce possible?

Merci, A+

P.S. Mon code:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
InputSource source;
source = new InputSource(new FileInputStream(configFilePath));
 
// XPath creation
XPathFactory fact = XPathFactory.newInstance();
XPath xpath = fact.newXPath();
 
//XPath evaluation
XPathExpression exp;
Object result;
exp = xpath.compile("/configuration/logger[@name='Lua']/level/@value='DEBUG'");
result = exp.evaluate(source);
 
//Stocker dans configFilePath... ?!?