Re: How serialize DOMDocument object?
| From: | Colin Guthrie | Date: | Fri, 12 Dec 2008 10:17:15 +0000 |
| Subject: | Re: How serialize DOMDocument object? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-284528@lists.php.net to get a copy of this message | ||
'Twas brillig, and Михаил Гаврилов at 12/12/08 06:23 did gyre and gimble:
How serialize DOMDocument object?Easiest way is to save it to an XML string and then load it again. If you want a conveneinet way to store domdocuments in the session, then just extend the class and define __sleep and __wakup functions that essentially do the save/load for you. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contributor [http://www.mandriva.com/] PulseAudio Hacker [http://www.pulseaudio.org/] Trac Hacker [http://trac.edgewall.org/]