Re: How serialize DOMDocument object?

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

 



Михаил Гаврилов wrote:
How serialize DOMDocument object?

describe: "serialize — Generates a storable representation of a value"
note: "It is not possible to serialize PHP built-in objects."
see: http://uk2.php.net/serialize

solve:
$s = DOMDocument->saveXML(); // serialized
DOMDocument->loadXML($s); // unserialize

or if you really want to use serialize function

$s = DOMDocument->saveXML();
serialize($s);

--
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