Skip to Content.
Sympa Menu

xom-interest - [XOM-interest] Xpath that returns numeric values

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Christophe Marchand <christophe.marchand AT axyus.com>
  • To: XOM API for Processing XML with Java <xom-interest AT lists.ibiblio.org>
  • Subject: [XOM-interest] Xpath that returns numeric values
  • Date: Wed, 22 Feb 2012 18:30:09 +0100

Hi !

Element.query("count(//document[@imported])"); throws this exception :
nu.xom.XPathTypeException: XPath expression count(//document[@imported]) returned a java.lang.Double instead of a node-set.
at nu.xom.JaxenConnector.selectNodes(Unknown Source)
at nu.xom.Node.query(Unknown Source)
at nu.xom.Node.query(Unknown Source)

Is there a workaround, or should I use
Element.query("count(//document[@imported])").size() instead ?

Which workaround for avg(...) functions ?

Thanks in advance,
Christophe




Archive powered by MHonArc 2.6.24.

Top of Page