We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9af9c77 commit 926a561Copy full SHA for 926a561
README.md
@@ -92,14 +92,10 @@ echo $root;
92
// creates an instance from a string
93
$xml = DomNode::createFromString('<root><item id="101" /><item id="102" /><item id="103" /></root>');
94
95
-// creates an instance from a document
+// creates an instance from a given DOMElement
96
$doc = new DOMDocument("1.0", "UTF-8");
97
$doc->loadXML('<root><item id="101" /><item id="102" /><item id="103" /></root>');
98
-$xml = DomNode::createFromDocument($doc);
99
-
100
-// creates an instance from a given DOMElement
101
-// $element is a DOMElement object
102
-$xml = DomNode::createFromElement($element);
+$xml = DomNode::createFromElement($doc->documentElement);
103
```
104
105
#### Use the `query` method
0 commit comments