Creation d'un DOM document a partir d'un string
| Newsgroups | gmane.text.xml.french.tech |
|---|---|
| Message-ID | <OF83FFD5D3.5268C5CB-ONC1257162.00544A2D-C1257162.00548211@mpsa.com> |
Bonjour,
Je possede un String dans lequel il y a du XML. Je voudrais faire un xpath
sur ce String. Pour cela, j'essaye de transformer mon String:
ByteArrayInputStream documentStream = new
ByteArrayInputStream(xmlFlux.getBytes());
NodeList phraseNodeList = xInterrogate.evaluate("phrase",documentStream);
sachant que :
xmlFlux = <phrases><phrase><code>V34490</code></phrase></phrases>
Dans ce cas precis j'obtiens:
phraseNodeList.getLength() = 0 alors qu'il devrait me retourner 1 !
Merci