Portability | portable |
---|---|
Stability | experimental |
Maintainer | Uwe Schmidt (uwe@fh-wedel.de) |
Version : $Id: XPathEval.hs,v 1.8 20061012 11:51:29 hxml Exp $
The core functions for evaluating the different types of XPath expressions.
Each Expr
-constructor is mapped to an evaluation function.
- getXPath :: String -> XmlTree -> XmlTrees
- getXPathWithNsEnv :: Attributes -> String -> XmlTree -> XmlTrees
- getXPathSubTrees :: String -> XmlTree -> XmlTrees
- getXPathSubTreesWithNsEnv :: Attributes -> String -> XmlTree -> XmlTrees
- getXPathNodeSet :: String -> XmlTree -> XmlNodeSet
- getXPathNodeSetWithNsEnv :: Attributes -> String -> XmlTree -> XmlNodeSet
- evalExpr :: Env -> Context -> Expr -> XPathFilter
Documentation
getXPath :: String -> XmlTree -> XmlTreesSource
Select parts of a document by an XPath expression.
The main filter for selecting parts of a document via XPath. The string argument must be a XPath expression with an absolute location path, the argument tree must be a complete document tree. Result is a possibly empty list of XmlTrees forming the set of selected XPath values. XPath values other than XmlTrees (numbers, attributes, tagnames, ...) are convertet to text nodes.
getXPathWithNsEnv :: Attributes -> String -> XmlTree -> XmlTreesSource
Select parts of a document by a namespace aware XPath expression.
Works like getXPath
but the prefix:localpart names in the XPath expression
are interpreted with respect to the given namespace environment
getXPathSubTrees :: String -> XmlTree -> XmlTreesSource
Select parts of an XML tree by a XPath expression.
The main filter for selecting parts of an arbitrary XML tree via XPath. The string argument must be a XPath expression with an absolute location path, There are no restrictions on the arument tree.
No canonicalization is performed before evaluating the query
Result is a possibly empty list of XmlTrees forming the set of selected XPath values. XPath values other than XmlTrees (numbers, attributes, tagnames, ...) are convertet to text nodes.
getXPathSubTreesWithNsEnv :: Attributes -> String -> XmlTree -> XmlTreesSource
Same as getXPathSubTrees
but with namespace aware XPath expression
getXPathNodeSet :: String -> XmlTree -> XmlNodeSetSource
compute the node set of an XPath query
getXPathNodeSetWithNsEnv :: Attributes -> String -> XmlTree -> XmlNodeSetSource
compute the node set of a namespace aware XPath query