Open acoulton opened 8 years ago
For example, to parse list-groups or other repeating multi element structures from a Mink NodeElement.
eg to get from:
<div class="list-group-item"> <div class="list-group-item-heading">Heading text</div> <div class="list-group-item-body"> <strong>User: </strong><span class="username">@someuser</span> </div> </div>
to:
| title | username | | Heading text | @someuser |
So you would provide an array of container node elements and the mapping of CSS / xpath selector to column title.
$table = $parser->parse( $container->findAll('css', '.list-group-item'), [ 'title' => ['css', '.list-group-item-heading'], 'user' => ['css', '.list-group-item-body .username'] ] );
For example, to parse list-groups or other repeating multi element structures from a Mink NodeElement.
eg to get from:
to:
So you would provide an array of container node elements and the mapping of CSS / xpath selector to column title.