Bonjour,
J'utilise XPath pour recuperer un noeud a partir d'un chemin, voici le code:
L'erreur est : Impossile de convertir #BOOLEAN en un NodeList !
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 Document document = builder.parse( new File("schema.xsd") ); String e = "/xsd:schema/xsd:element/@type=LibraryType"; // Create the XPath XPathFactory factoryXPath = XPathFactory.newInstance(); XPath xpath = factoryXPath.newXPath(); // Evaluate the expression XPath XPathExpression exp = xpath.compile(e); Node node = (Node)exp.evaluate(document, XPathConstants.NODE);
Si quelqu'un sait d'ou vient cette erreur, merci pour votre aide
Partager