---------- Forwarded message ---------- From: ZHOU Xiao-bo <zhxb.u...@gmail.com> Date: 2010/1/24 Subject: Re: [webkit-dev] DOM Serialization? To: Christopher White <skullkn...@gmail.com>
I think you can do that, if you don't care about the strick definition of serialization. Actually, a Node is composed of Attrs which are <key, value> pairs. And 'key' and 'value' are strings. So, you can just use TLVs to store the Node's type and Attrs. You can either ignore its non-string member variables, because you can rebuild them through Attrs or store them in TLVs too. As for the implimentation, you can write a two friend functions for every class derived from Node to make serialization and deserialization. And the function 'createmarkup' may give you some clue. BTW: the DOM Level 3 defines Load & Save interface of DOM, does WebCore impliment that. 2010/1/22 Christopher White <skullkn...@gmail.com> > Is it possible to save the DOM resulting from the parsing of HTML / CSS > into a file and then read it back instead of re-parsing the HTML (similar to > Java object serialization). Does it save any time or is it a wash? > > I know there is a dump render tree function but does it save everything you > need so that you can re-render the HTML page w/o the original HTML / CSS > files? > > > > _______________________________________________ > webkit-dev mailing list > webkit-dev@lists.webkit.org > http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev > >
_______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev