Re: [PHP-XML-DEV] serializing DomDocument objects.

[email protected] (Derick Rethans)
Newsgroups php.xml.dev
Message-ID <[email protected]>
On Fri, 26 Sep 2003, neill wrote:

> > you have a DomDocument with child-elements?
> > 
> > No, it's not possible (even if you don't have Child-elements). libxml2 
> > has no possibility to "serialize" their internal tree and will not have 
> > in the soon future.
> > 
> > Therefore the only solution is to use saveXML(). We could (but i don't 
> > know the details) wrap that around serialize, but it doesn't make much 
> > sense to me and speed gain would be zero...
> 
> ok. well, maybe you could talk to the other developer's and see if they
> understand my point - and whether it would be worthwhile to add the
> ability to serialize DomDocuent objects.

It's not possible. saveXML GIVES you a serialized form of your 
DocDocument... that's the whole point of DOM.

> i'm not saying "i'm right you're
> wrong" or anything like that, all i want is to make my software as fast as
> possible, and i thought serializing would help by avoiding having to
> create the "internal tree" again and again.

Perhaps you'd need to rethink your design...

Derick

-- 
"Interpreting what the GPL actually means is a job best left to those
                    that read the future by examining animal entrails."
-------------------------------------------------------------------------
 Derick Rethans                                 http://derickrethans.nl/ 
 International PHP Magazine                          http://php-mag.net/
-------------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.