If you are using DOM this is a trivial task.
Just store the DOMDocument object and make a clone of it everytime you need
to use it.
Cloning the document is performed like this.

Create a new DOMDocument with the same namespace, publicid, systemid and
DocType as the original.
Deep import the root node from the original document into the new document
and thereby get a new node.
Add that node to the new document as root.
Now you have a copy. I might have forgotten some step or problem but you'll
probably work it out by yourself.

Regards

Erik Rydgren
Mandarinen systems AB
Sweden


-----Original Message-----
From: �L �l�� [mailto:[EMAIL PROTECTED]]
Sent: den 22 maj 2002 17:15
To: [EMAIL PROTECTED]
Subject: how to re-use the parsed document




hi,
prehaps it is a trival task for most of you guys, but i couldn't get it
right, i was wondering whether it is possible to save the parsed document
and allow it to be use whenever it is needed. at present i have an xml
document that is needed for different purposes, so instead of re-parsing
the document each time for specify purposes, can i stored the parsed
document in a variable and call such variable whenever it is needed.  if it
is possible can somebody suggest how it could be done?

Many thanks
Regards
Kit



_________________________________________________________________
�b�z����ʸ˸m�W�ǰe���� Hotmail �l��A�в��ܡGhttp://mobile.msn.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to