FxXPath

The license could not be verified: License Certificate has expired!

How to get FxXPath

import FxXPath from 'fontoxml-fx/src/FxXPath.jsx'

Type: Component

Runs the given XPath expression on the given context and observes the result.

The result is automatically passed to the children (as a function) prop of this component whenever it changes.

See useXPath if you want a React hook instead of a React component. Note: this component simply uses useXPath internally and renders its children as a function that receives the results from useXPath as an argument.

See evaluateXPath for more information regarding XPath, XPath evaluation, variables and return types.

Props

# Name Type Description
1. children Function

Children as a function function


  Arguments
# Name Type Description
1. results any
  Returns

Type: ReactElement

2. context Node

The context of the XPath function, usually a node

3. expression XPathQuery

The XPath expression to evaluate and watch

4. returnType XPATH_RETURN_TYPES

One of the values defined on XPATH_RETURN_TYPES. The XPATH_RETURN_TYPES can be imported from the FxXPath component.

5. [variables] Object | Null

Any additional variables to use with the XPath

Was this page helpful?