You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-5
Original file line number
Diff line number
Diff line change
@@ -3,11 +3,17 @@
3
3
BetterDOMDocument is a handy PHP utility class for working with XML. It's a wrapper for PHP's built in DOMDocument that provides a bunch of nice shortcuts that
4
4
makes working with XML in PHP a breeze. It has great built-in support for namespaces, xpath, and CSS selectors.
5
5
6
+
```
7
+
composer require highwire/better-dom-document
8
+
```
9
+
6
10
```php
7
11
<?php
8
12
13
+
use BetterDOMDocument\DOMDoc;
14
+
9
15
// We can load a new BetterDOMDocument from either a string or a DOMNode object
10
-
$dom = new BetterDOMDocument($xmlstring);
16
+
$dom = new DOMDoc($xmlstring);
11
17
12
18
// It's easy to output the entire document as an array, which is sometimes easier to work with in PHP
0 commit comments