sunra / php-simple-html-dom-parser

PHP Simple HTML DOM Parser adaptation for Composer and PSR-0
1.3k stars 352 forks source link

No removeChild() function #57

Open jdkolassa opened 6 years ago

jdkolassa commented 6 years ago

As far as I can determine, Simple HTML DOM does not have a way to actually remove DOM elements from a document. This can be troublesome, especially if you're using mpdf to make a PDF file and there's an <svg> tag in there; mpdf flips out whenever it sees one.

There may be a good reason removeChild() has not been implemented, but as a suggestion for a future update, could such a function be implemented?

Hodel1 commented 6 years ago

I think sunra has only forked the source and added things like namespace, so you have to report this to their sourceforge page

jdkolassa commented 6 years ago

Ah, good point.

plonknimbuzz commented 6 years ago

FYI only. i hope help you to have more alternative library to work.

sunra idle => paquettg idle => now

now i use the last library. but still monitor all those library, because maybe they have different good point

Sarasranglt commented 4 years ago

Here's how I solved it.

$childNode = $dom->find('Your Child Node');
$childNode->setAttribute('outertext','');