File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,11 @@ The DomCrawler Component
77
88 The DomCrawler Component eases DOM navigation for HTML and XML documents.
99
10+ .. note ::
11+
12+ While possible, the DomCrawler is not designed for manipulation of the
13+ DOM or re-dumping HTML/XML.
14+
1015Installation
1116------------
1217
@@ -172,6 +177,22 @@ and :phpclass:`DOMNode` objects:
172177 $crawler->addNode($node);
173178 $crawler->add($document);
174179
180+ .. note ::
181+
182+ These methods on the ``Crawler `` are intended to initially populate your
183+ ``Crawler `` and aren't intended to be used to further manipulate a DOM
184+ (though this is possible). However, since the ``Crawler `` is a set of
185+ :phpclass: `DOMElement ` objects, you can use any method or property available
186+ on :phpclass: `DOMElement `, :phpclass: `DOMNode ` or :phpclass: `DOMDocument `.
187+ For example, you could get the HTML of a ``Crawler `` with something like
188+ this::
189+
190+ $html = '';
191+
192+ foreach ($crawler as $domElement) {
193+ $html.= $domElement->ownerDocument->saveHTML();
194+ }
195+
175196Form and Link support
176197~~~~~~~~~~~~~~~~~~~~~
177198
You can’t perform that action at this time.
0 commit comments