Lines Matching refs:dom
4 dom
8 $dom = new DOMDocument();
9 $dom->loadHTML('<!DOCTYPE HTML><html><p>hi</p> test <p>hi2</p></html>');
14 $dom->documentElement->replaceChildren($dom->documentElement);
20 $dom->documentElement->firstElementChild->replaceChildren($dom->documentElement);
27 $dom->documentElement->replaceChildren('foo', $dom->createElement('p'), 'bar');
28 echo $dom->saveXML();
30 $fragment1 = $dom->createDocumentFragment();
31 $fragment1->appendChild($dom->createElement('a'));
32 $fragment1->appendChild($dom->createElement('b'));
33 $fragment2 = $dom->createDocumentFragment();
35 $fragment3 = $dom->createDocumentFragment();
36 $dom->documentElement->replaceChildren($fragment1, $fragment2, $fragment3);
37 echo $dom->saveXML();
41 $fragment = $dom->createDocumentFragment();
43 var_dump($dom->saveXML($fragment));
45 $old = $fragment->appendChild($dom->createElement('p', 'test'));
46 $fragment->replaceChildren($dom->createElement('b', 'test'));
47 echo $dom->saveXML($fragment), "\n";
52 $dom->replaceChildren($dom->documentElement);
53 echo $dom->saveXML();
57 $dom->documentElement->replaceChildren();
58 echo $dom->saveXML();