Skip to content

Commit

Permalink
docs: simplify fromXml example
Browse files Browse the repository at this point in the history
  • Loading branch information
phanan committed May 31, 2024
1 parent 55f0cb6 commit 157aef3
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,7 @@ This method also accepts two additional parameters:
If you already have the XML string, you can parse it using `Poddle::fromXml` instead:

```php
use Illuminate\Support\Facades\Http;

$poddle = \PhanAn\Poddle::fromXml(Http::timeout(60)
->withoutVerifying()
->get('https://example.com/feed.xml')
->body()
);
$poddle = \PhanAn\Poddle::fromXml(file_read_contents('feed.xml'));
```

Upon success, both `fromUrl` and `fromXml` methods return a `Poddle` object, which you can use to access the feed's channel and episodes.
Expand Down

0 comments on commit 157aef3

Please sign in to comment.