Hi Dominique,

I'm back again. I review you code and the XPath Spec.

You do:

from = ( Element ) xpath1.selectSingleNode(_xmlMessageDoc.getRootElement());

The instance form is now a Element. 

Then you create XPath and selects a the result List as follows:

XPath xpathExpr = DocumentHelper.createXPath("//fac:NbDonneesTotal");
        xpathExpr.setNamespaceContext( sncFac);
        List results = xpathExpr.selectNodes(from);

I think the Expression // starts from Document and trying to get its root
node. As you apply your XPath on a Element Jaxen won't select the right
amount
of fac:NbDonnesTotal Element's. .// informs Jaxen that "from" should be used
to start from 

Here is a cut of the XPath Spec:

- //para selects all the para descendants of the document root and thus
selects all para elements in the same document as the context node


- .//para selects the para element descendants of the context node


I think we should dicuss this Error when James or Bob are back. Both better
XPath gurus than I :-)

Thx

Toby

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net




-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net



_______________________________________________
dom4j-dev mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-dev

Reply via email to