Packages

class ScalesXPath extends ScalesBaseJaxenXPath

Use evaluate every time, select nodes will not work.

NB: This class is only available with the scales-jaxen dependencies.

Linear Supertypes
ScalesBaseJaxenXPath, Serializable, org.jaxen.XPath, AnyRef, Any
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ScalesXPath
  2. ScalesBaseJaxenXPath
  3. Serializable
  4. XPath
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ScalesXPath(xpath: String, nsMap: Map[String, String] = Map(), nameConversion: (QName) ⇒ QName = ScalesXPath.defaultNoConversion)

    nsMap

    a prefix -> namespace map. Use the companion object to pass in PrefixedNamespaces

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def addNamespace(prefix: String, uri: String): Unit

    Add a namespace prefix-to-URI mapping for this XPath expression.

    Add a namespace prefix-to-URI mapping for this XPath expression.

    Namespace prefix-to-URI mappings in an XPath are independent of those used within any document. Only the mapping explicitly added to this XPath will be available for resolving the XPath expression.

    This is a convenience method for adding mappings to the default NamespaceContext in place for this XPath. If you have installed a custom NamespaceContext that is not a SimpleNamespaceContext, then this method will throw a JaxenException.

    prefix

    the namespace prefix

    uri

    the namespace URI

    Definition Classes
    ScalesBaseJaxenXPath → XPath
    Exceptions thrown

    JaxenException if the NamespaceContext used by this XPath is not a SimpleNamespaceContext

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def attributePaths(path: xml.XmlPath): Iterable[AttributePath]

    Evaluates path returning only matching AttributePaths

  7. def booleanValueOf(node: Any): Boolean

    Retrieve a boolean-value interpretation of this XPath expression when evaluated against a given context.

    Retrieve a boolean-value interpretation of this XPath expression when evaluated against a given context.

    The boolean-value of the expression is determined per the boolean(..) function defined in the XPath specification. This means that an expression that selects zero nodes will return false, while an expression that selects one or more nodes will return true.

    node

    the node, node-set or Context object for evaluation. This value can be null.

    returns

    the boolean-value of the result of evaluating this expression with the specified context node

    Definition Classes
    ScalesBaseJaxenXPath → XPath
    Exceptions thrown

    JaxenException if an XPath error occurs during expression evaluation

  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  9. def createFunctionContext(): FunctionContext

    Create a default FunctionContext.

    Create a default FunctionContext.

    returns

    a default FunctionContext

    Attributes
    protected[jaxen]
    Definition Classes
    ScalesBaseJaxenXPath
  10. def createNamespaceContext(): NamespaceContext

    Create a default NamespaceContext.

    Create a default NamespaceContext.

    returns

    a default NamespaceContext instance

    Attributes
    protected[jaxen]
    Definition Classes
    ScalesBaseJaxenXPath
  11. def createVariableContext(): VariableContext

    Create a default VariableContext.

    Create a default VariableContext.

    returns

    a default VariableContext instance

    Attributes
    protected[jaxen]
    Definition Classes
    ScalesBaseJaxenXPath
  12. def debug(): String

    Returns a string representation of the parse tree.

    Returns a string representation of the parse tree.

    returns

    a string representation of the parse tree.

    Definition Classes
    ScalesBaseJaxenXPath
  13. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  15. def evaluate(path: xml.XmlPath): Iterable[Either[AttributePath, xml.XmlPath]]

    Jaxen can't sort non identity/reference equality based object models.

    Jaxen can't sort non identity/reference equality based object models. So we do the work for it and cut out the existing sorting.

    Additionally its nice to get a somewhat better result

  16. def evaluate(context: Any): AnyRef

    Evaluate this XPath against a given context.

    Evaluate this XPath against a given context. The context of evaluation may be any object type the navigator recognizes as a node. The return value is either a String, Double, Boolean, or List of nodes.

    When using this method, one must be careful to test the class of the returned object. If the returned object is a list, then the items in this list will be the actual Document, Element, Attribute, etc. objects as defined by the concrete XML object-model implementation, directly from the context document. This method does not return copies of anything, but merely returns references to objects within the source document.

    context

    the node, node-set or Context object for evaluation. This value can be null.

    returns

    the result of evaluating the XPath expression against the supplied context

    Definition Classes
    ScalesBaseJaxenXPath → XPath
    Exceptions thrown

    ClassCastException if the context is not a node

    JaxenException if an XPath error occurs during expression evaluation

  17. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. def get[T](path: xml.XmlPath): T

    Single primitive version with hidden cast :<

  19. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  20. def getContext(node: Any): Context

    Create a Context wrapper for the provided implementation-specific object.

    Create a Context wrapper for the provided implementation-specific object.

    node

    the implementation-specific object to be used as the context

    returns

    a Context wrapper around the object

    Attributes
    protected[jaxen]
    Definition Classes
    ScalesBaseJaxenXPath
  21. def getContextSupport(): ContextSupport

    Retrieve the ContextSupport aggregation of NamespaceContext, FunctionContext, VariableContext, and Navigator.

    Retrieve the ContextSupport aggregation of NamespaceContext, FunctionContext, VariableContext, and Navigator.

    returns

    aggregate ContextSupport for this XPath expression

    Attributes
    protected[jaxen]
    Definition Classes
    ScalesBaseJaxenXPath
  22. def getFunctionContext(): FunctionContext

    Retrieve the FunctionContext used by this XPath expression.

    Retrieve the FunctionContext used by this XPath expression.

    A FunctionContext is responsible for resolving all function calls used within the expression.

    If this XPath expression has not previously had a FunctionContext installed, a new default FunctionContext will be created, installed and returned.

    returns

    the FunctionContext used by this expression

    Definition Classes
    ScalesBaseJaxenXPath → XPath
    See also

    FunctionContext

  23. def getNamespaceContext(): NamespaceContext

    Retrieve the NamespaceContext used by this XPath expression.

    Retrieve the NamespaceContext used by this XPath expression.

    A NamespaceContext is responsible for mapping prefixes used within the expression to namespace URIs.

    If this XPath expression has not previously had a NamespaceContext installed, a new default NamespaceContext will be created, installed and returned.

    returns

    the NamespaceContext used by this expression

    Definition Classes
    ScalesBaseJaxenXPath → XPath
    See also

    NamespaceContext

  24. def getNavigator(): Navigator

    Retrieve the XML object-model-specific Navigator for us in evaluating this XPath expression.

    Retrieve the XML object-model-specific Navigator for us in evaluating this XPath expression.

    returns

    the implementation-specific Navigator

    Definition Classes
    ScalesBaseJaxenXPath → XPath
  25. def getRootExpr(): Expr

    Retrieve the root expression of the internal compiled form of this XPath expression.

    Retrieve the root expression of the internal compiled form of this XPath expression.

    Internally, Jaxen maintains a form of Abstract Syntax Tree (AST) to represent the structure of the XPath expression. This is normally not required during normal consumer-grade usage of Jaxen. This method is provided for hard-core users who wish to manipulate or inspect a tree-based version of the expression.

    returns

    the root of the AST of this expression

    Definition Classes
    ScalesBaseJaxenXPath
  26. def getVariableContext(): VariableContext

    Retrieve the VariableContext used by this XPath expression.

    Retrieve the VariableContext used by this XPath expression.

    A VariableContext is responsible for resolving all variables referenced within the expression.

    If this XPath expression has not previously had a VariableContext installed, a new default VariableContext will be created, installed and returned.

    returns

    the VariableContext used by this expression

    Definition Classes
    ScalesBaseJaxenXPath → XPath
    See also

    VariableContext

  27. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  28. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  29. val nameConversion: (QName) ⇒ QName
  30. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  31. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  32. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  33. val nsMap: Map[String, String]
  34. def numberValueOf(node: Any): Number

    Retrieve a number-value interpretation of this XPath expression when evaluated against a given context.

    Retrieve a number-value interpretation of this XPath expression when evaluated against a given context.

    The number-value of the expression is determined per the number(..) core function as defined in the XPath specification. This means that if this expression selects multiple nodes, the number-value of the first node is returned.

    node

    the node, node-set or Context object for evaluation. This value can be null.

    returns

    a Double indicating the numeric value of evaluating this expression against the specified context

    Definition Classes
    ScalesBaseJaxenXPath → XPath
    Exceptions thrown

    JaxenException if an XPath error occurs during expression evaluation

  35. def selectNodes(node: Any): List[_]

    Select all nodes that are selected by this XPath expression.

    Select all nodes that are selected by this XPath expression. If multiple nodes match, multiple nodes will be returned. Nodes will be returned in document-order, as defined by the XPath specification. If the expression selects a non-node-set (i.e. a number, boolean, or string) then a List containing just that one object is returned.

    node

    the node, node-set or Context object for evaluation. This value can be null.

    returns

    the node-set of all items selected by this XPath expression

    Definition Classes
    ScalesBaseJaxenXPath → XPath
    Exceptions thrown

    JaxenException if an XPath error occurs during expression evaluation

    See also

    #selectNodesForContext

  36. def selectNodesForContext(context: Context): List

    Select all nodes that match this XPath expression on the given Context object.

    Select all nodes that match this XPath expression on the given Context object. If multiple nodes match, multiple nodes will be returned in document-order, as defined by the XPath specification. If the expression selects a non-node-set (i.e. a number, boolean, or string) then a List containing just that one object is returned.

    context

    the Context which gets evaluated

    returns

    the node-set of all items selected by this XPath expression

    Attributes
    protected[jaxen]
    Definition Classes
    ScalesBaseJaxenXPath
    Exceptions thrown

    JaxenException if an XPath error occurs during expression evaluation

  37. def selectSingleNode(node: Any): AnyRef

    Select only the first node selected by this XPath expression.

    Select only the first node selected by this XPath expression. If multiple nodes match, only one node will be returned. The selected node will be the first selected node in document-order, as defined by the XPath specification.

    node

    the node, node-set or Context object for evaluation. This value can be null.

    returns

    the node-set of all items selected by this XPath expression

    Definition Classes
    ScalesBaseJaxenXPath → XPath
    Exceptions thrown

    JaxenException if an XPath error occurs during expression evaluation

    See also

    #selectNodes

  38. def selectSingleNodeForContext(context: Context): AnyRef

    Return only the first node that is selected by this XPath expression.

    Return only the first node that is selected by this XPath expression. If multiple nodes match, only one node will be returned. The selected node will be the first selected node in document-order, as defined by the XPath specification. If the XPath expression selects a double, String, or boolean, then that object is returned.

    context

    the Context against which this expression is evaluated

    returns

    the first node in document order of all nodes selected by this XPath expression

    Attributes
    protected[jaxen]
    Definition Classes
    ScalesBaseJaxenXPath
    Exceptions thrown

    JaxenException if an XPath error occurs during expression evaluation

    See also

    #selectNodesForContext

  39. def setFunctionContext(functionContext: FunctionContext): Unit

    Set a FunctionContext for use with this XPath expression.

    Set a FunctionContext for use with this XPath expression.

    A FunctionContext is responsible for resolving all function calls used within the expression.

    functionContext

    the FunctionContext to install for this expression

    Definition Classes
    ScalesBaseJaxenXPath → XPath
    See also

    FunctionContext

    FunctionContext#getFunction

  40. def setNamespaceContext(namespaceContext: NamespaceContext): Unit

    Set a NamespaceContext for use with this XPath expression.

    Set a NamespaceContext for use with this XPath expression.

    A NamespaceContext is responsible for translating namespace prefixes within the expression into namespace URIs.

    namespaceContext

    the NamespaceContext to install for this expression

    Definition Classes
    ScalesBaseJaxenXPath → XPath
    See also

    NamespaceContext

    NamespaceContext#translateNamespacePrefixToUri

  41. def setVariableContext(variableContext: VariableContext): Unit

    Set a VariableContext for use with this XPath expression.

    Set a VariableContext for use with this XPath expression.

    A VariableContext is responsible for resolving all variables referenced within the expression.

    variableContext

    The VariableContext to install for this expression

    Definition Classes
    ScalesBaseJaxenXPath → XPath
    See also

    VariableContext

    VariableContext#getVariableValue

  42. def stringValueOf(node: Any): String

    Retrieves the string-value of the result of evaluating this XPath expression when evaluated against the specified context.

    Retrieves the string-value of the result of evaluating this XPath expression when evaluated against the specified context.

    The string-value of the expression is determined per the string(..) core function defined in the XPath specification. This means that an expression that selects zero nodes will return the empty string, while an expression that selects one-or-more nodes will return the string-value of the first node.

    node

    the node, node-set or Context object for evaluation. This value can be null.

    returns

    the string-value of the result of evaluating this expression with the specified context node

    Definition Classes
    ScalesBaseJaxenXPath → XPath
    Exceptions thrown

    JaxenException if an XPath error occurs during expression evaluation

  43. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  44. def toString(): String

    Return the original expression text.

    Return the original expression text.

    returns

    the normalized XPath expression string

    Definition Classes
    ScalesBaseJaxenXPath → AnyRef → Any
  45. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  46. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  47. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  48. def withNameConversion(conversion: (QName) ⇒ QName): ScalesXPath

    Provides a conversion function for QNames, this allows a caller to remove namespaces, for example via ScalesXPath.localOnly

  49. def xmlPaths(path: xml.XmlPath): Iterable[xml.XmlPath]

    Evaluates path returning only matching XmlPaths

  50. val xpath: String

Deprecated Value Members

  1. def valueOf(node: Any): String

    Returns the XPath string-value of the argument node.

    Returns the XPath string-value of the argument node.

    node

    the node whose value to take

    returns

    the XPath string value of this node

    Definition Classes
    ScalesBaseJaxenXPath
    Deprecated

    replaced by #stringValueOf

    Exceptions thrown

    JaxenException if an XPath error occurs during expression evaluation

Inherited from ScalesBaseJaxenXPath

Inherited from Serializable

Inherited from org.jaxen.XPath

Inherited from AnyRef

Inherited from Any

Ungrouped