Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Sammyjo20 committed Dec 5, 2023
1 parent c26b2f4 commit 87d0c57
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,14 @@ $reader->element('song')->get(); // [Element('Luke Combs - When It Rains It Pour

$reader->element('song.2')->sole(); // Element('London Symfony Orchestra - Starfield Suite')
```
#### Removing Namespaces From XML
Sometimes it's easier to traverse an XML document when you don't have to worry about namespaces and prefixes to elements. If you would like to remove them you can use the `removeNamespaces()` method on the reader.
```php
$reader = XmlReader::fromString(...);

$reader->removeNamespaces();
```

#### Lazily Iterating
When searching a large file, you can use the `lazy` or `collectLazy` methods which will return a generator of results only keeping one item in memory at a time.
```php
Expand Down

0 comments on commit 87d0c57

Please sign in to comment.