Skip to content

XPath returning array broke DOMElementValue function #1214

@norberttech

Description

@norberttech

In the following example we are first using XPath to find a element in given node, however domElementValue() will return null because XPath returns an array, not DOMElement which is expected by domElementValue() function:

->withEntry('name', ref('node')->xpath('name')->domElementValue())

We need to do two things:

  1. implement ref('node')->xpath('id')->first() - first function
  2. domElementValue should check if value is a single element array of DOMElements and then just grab this element

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions