Skip to content

Commit 41efa44

Browse files
authored
Update quick start code
1 parent 44d9568 commit 41efa44

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ $reader->open($inputFile);
1414

1515
$reader->process([
1616
// Find all person elements
17-
'(.*/person(?:\[\d*\])?)' => function (SimpleXMLElement $data, $path): void {
17+
'(.*/person' => function (SimpleXMLElement $data, $path): void {
1818
echo "1) Value for ".$path." is ".PHP_EOL.
1919
$data->asXML().PHP_EOL;
2020
},
21-
// Find the corresponding element in the hierarchy
21+
// Find the /root/person2/firstname element in the document
2222
'/root/person2/firstname' => function (string $data): void {
2323
echo "3) Value for /root/person2/firstname is ". $data.PHP_EOL;
2424
}

0 commit comments

Comments
 (0)