Metreeca Gear
    Preparing search index...

    Module @metreeca/gear-xml - v0.2.0

    XML and HTML processing tasks.

    Parses XML and HTML payloads, addresses the nodes they hold by XPath expression, and reads the selected values as the types a consumer expects.

    @metreeca/gear-xml

    npm

    XML and HTML processing tasks for @metreeca/gear.

    Installation

    npm install @metreeca/gear      # the job execution API
    npm install @metreeca/gear-xml # this package
    Important

    Node.js 22 or later is required.

    Warning

    TypeScript consumers must use "moduleResolution": "nodenext"/"node16"/"bundler" in tsconfig.json. The legacy "node" resolver is not supported.

    Usage

    Task Description
    xml() XML parser
    html() HTML parser
    xpath() XPath selector
    focus() Content extractor
    untag() Markdown renderer

    Support

    • open an issue to report a problem or to suggest a new feature
    • start a discussion to ask a how-to question or to share an idea

    License

    This project is licensed under the Apache 2.0 License – see LICENSE file for details.

    Target

    A value an expression is evaluated against or reports.

    Attribute

    An attribute of an element, as a node.

    XPath

    XPath selector over parsed X/HTML trees.

    focus

    Creates a content extractor.

    html

    Creates an HTML parser.

    untag

    Creates a markdown renderer.

    xml

    Creates an XML parser.

    xpath

    Creates an XPath selector.

    boolean

    Reads a selected value as a boolean.

    number

    Reads a selected value as a number.

    string

    Reads a selected value as text.

    Reads a selected value as a link.