Skip to content

Add the ability to chain reader methods on Element class #19

@Sammyjo20

Description

@Sammyjo20

It would be really cool if you could use the search/reader methods on the base Element class that comes from the reader.

$reader = XmlReader::fromString(...);

$element = $reader->element('food.2')->sole();

$element->element('name')->sole();
$element->value('name')->sole();
$element->xpathElement('//name')->sole();
$element->xpathValue('//name')->sole();

I've started implementing this as a proof-of-concept.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions