public class XPathFinderByCanonical extends Object
XPathNodePointer
with a constant score defined in
ScoreDefinitions.
It determines the canonical path by following the parent axis to the given root node. On every level, it counts the siblings of the same local name to determine the positional predicate for that location step.
Modifier and Type | Method and Description |
---|---|
static String |
computeCanonicalXPath(DOMNode node)
Gets the canonical XPath for a DOM node.
|
static void |
disableCache() |
static void |
enableCache() |
static XPathNodePointer |
getCanNodePointer(DOMNode node,
String rootPath,
DOMNodeFinderService.Score threshold)
NOT IMPLEMENTED.
|
static XPathNodePointer |
getCanonicalXPath(DOMNode node)
Gets the absolute canonical XPath expression for a DOM node.
|
static XPathNodePointer |
getCanonicalXPath(DOMNode node,
DOMNode rootNode)
Gets the scored XPath expression candidate for a DOM node.
|
static void |
invalidateCache() |
public static void enableCache()
public static void disableCache()
public static void invalidateCache()
public static XPathNodePointer getCanonicalXPath(DOMNode node)
node
- the DOM nodepublic static XPathNodePointer getCanonicalXPath(DOMNode node, DOMNode rootNode)
node
- the DOM noderootNode
- the root nodepublic static XPathNodePointer getCanNodePointer(DOMNode node, String rootPath, DOMNodeFinderService.Score threshold)
node
- rootPath
- threshold
- public static String computeCanonicalXPath(DOMNode node)
node
- the DOM nodeWebAPIException
Copyright © 2020 OXPath Team. All rights reserved.