Hello,
I am in trouble with selectSingleNode !
I use the following code:
XPath Time_XPath = DocumentHelper.createXPath(
"//foo:Time/text()='" + HRM_DateTime_Seq_String + "'");
HashMap<String,String> Time_map = new
HashMap<String,String>();
Time_map.put("foo",TrainingCenterDatabase.getNamespaceURI());
Time_XPath.setNamespaceURIs(map);
if (Time_XPath.booleanValueOf(TrainingCenterDatabase))
{
System.out.println(HRM_DateTime_Seq_String + ":
Match");
Node node =
Time_XPath.selectSingleNode(TrainingCenterDatabase); <== problem
}
else
{
System.out.println(HRM_DateTime_Seq_String + ":
No Match");
}
An I get:
XPath expression is not a Node. It was: true of type: java.lang.Boolean
at org.dom4j.xpath.DefaultXPath.selectSingleNode(DefaultXPath.java:169)
at Merge_TCX_to_HRM.main(Merge_TCX_to_HRM.java:147)
selectSingleNode does not return a Node but True Or False !
I do not understand... Could you help me ?
Sincerely.
Patrick Renard
_________________________________________________________________
Vous voulez savoir ce que vous pouvez faire avec le nouveau Windows Live ?
Lancez-vous !
http://www.microsoft.com/windows/windowslive/default.aspx
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
dom4j-user mailing list
dom4j-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dom4j-user