Replies: 1 comment 2 replies
-
I think you need this: use Laravie\Parser\Xml\Document;
use Laravie\Parser\Xml\Reader;
$xml = (new Reader(new Document()))->extract('
<api>
<user followers="5">
<id>1</id>
<email>crynobone@gmail.com</email>
</user>
<user followers="6">
<id>2</id>
<email>2crynobone@gmail.com</email>
</user>
</api>
');
$user = $xml->parse([
'users' => ['uses' => 'user[id,email,::followers>followers]'],
]);
print_r($user); |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How can I resolve multiple identical nodes ?
like this
Error Result:
Should get two users, but only get one. : (
Beta Was this translation helpful? Give feedback.
All reactions