Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $html = <<<EOF
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- </head>
- <body>
- <p> </p>
- </body>
- </html>
- EOF;
- // This one works perfectly.
- $dom = new DOMDocument();
- $dom->loadXML($html, LIBXML_DTDLOAD);
- //Do here what you will.
- print $dom->saveXML();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement