From 87d0c57687ca0abc2c1195cc76c866b18d634561 Mon Sep 17 00:00:00 2001 From: Sam C <29132017+Sammyjo20@users.noreply.github.com> Date: Tue, 5 Dec 2023 13:09:03 +0000 Subject: [PATCH] Update README.md --- .github/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/README.md b/.github/README.md index 60ce055..66c48dc 100644 --- a/.github/README.md +++ b/.github/README.md @@ -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