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:
- implement
ref('node')->xpath('id')->first() - first function
- domElementValue should check if value is a single element array of DOMElements and then just grab this element