Re: How to prevent DomDocument from adding a !DOCTYPE.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mathijs van Veluw wrote:
Hello there,

Im using DomDocument currently and i realy want to prevent it from adding the !DOCTYPE and mabye even <html> and <body> etc..
Is this possible and how?

Thx in advance.
Mathijs.


---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 000703-1, 01/15/2007
Tested on: 1/16/2007 3:37:11 PM
avast! - copyright (c) 1988-2007 ALWIL Software.
http://www.avast.com

Hello again,

I will try to explain what i want to do.
Mabye there is an other soluttion to fix my problem.

I have some HTML content:
<div id="test1">
  <div id="test2" class="testClass">
    <span style="font-color: #900;" class="secondTestClass">
      Testing<br>
    </span>
    ØøÅå_^{}\[~]|€ÆæßÉ@£$¥èéùìòÇ!"#¤%&'()*+,ÖÑܧ¿äöñüà-./:;<=>?¡Ä
  </div>
</div>


Now i need to parse the HTML by getting all the class and id attributes and replace them with something else, and after that return the modified HTML.

The DomDocument looked nice for this, because it had getElementsByTagName() etc..

Is there mabye an other way to parse this HTML and replace/modify its atttributes?

Thx in advanced.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux