Hi,

Wednesday, January 1, 2003, 5:28:43 AM, you wrote:
>> Try encoding like this:
>> $retval = base64_encode(serialize( domxml_open_mem( $xml )));
>> and on the next page:
>> $xml = unserialize(base64_decode($xml));
>> It works via html but don't know enough about soap

BC> Well, you don't have to use soap - you can use sessions and get the
BC> same result.
BC> As for your suggestion, it didn't work. :(  I can do a print_r() and a
BC> var_dump() on the variable before and after I serialize/encode it and
BC> get the save values each time:

BC> var_dump():

BC> object(domdocument)(9) {
BC>   ["name"]=>
BC>   string(9) "#document"
BC>   ["url"]=>
BC>   string(0) ""
BC>   ["version"]=>
BC>   string(3) "1.0"
BC>   ["standalone"]=>
BC>   int(-1)
BC>   ["type"]=>
BC>   int(9)
BC>   ["compression"]=>
BC>   int(-1)
BC>   ["charset"]=>
BC>   int(1)
BC>   [0]=>
BC>   int(14)
BC>   [1]=>
BC>   int(138478176)
BC> }

BC> print_r():

BC> domdocument Object
BC> (
BC>     [name] => #document
BC>     [url] =>
BC>     [version] => 1.0
BC>     [standalone] => -1
BC>     [type] => 9
BC>     [compression] => -1
BC>     [charset] => 1
BC>     [0] => 14
BC>     [1] => 138478176
BC> )


BC> When I try to $DOMobject->dump_mem() before I serialize/encode it, I
BC> get the underlying XML.  However, when I use dump_mem() afterwards, I
BC> am getting those errors mentioned in my previous post.
BC> I just don't understand why.  I'm having no problems serializing and
BC> passing (through sessions or otherwise) other object, I'm just not
BC> having any luck with the internal DOM object.

BC> Chris
Well to get rid of the error message you need to create a dummy dom object b4
you unserialize like:

$obj = domxml_new_doc('1.0');

But I could not get serialize to do the whole dom object only the first
level....

-- 
regards,
Tom


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to