         return xmlXPathCastToBoolean(ptr) != 0
     }
 
+    // TODO: Use "Double" instead of "Number" on the Swift side?
     public func asNumber() -> Double {
         return xmlXPathCastToNumber(ptr)
     }

    }

    public func asNodeSet() -> [Node]? {
        switch value {
        case .NodeSet(let nodes): return nodes
        default: return nil

        xmlXPathFreeCompExpr(ptr);
    }

    /// Evaluates the XPath query with the given node as context node.
    public func evaluateOn(node: Node) throws -> XPathResult {
        let context = try XPathContext(node: node)
        let obj = xmlXPathCompiledEval(ptr, context.ptr)
