PHP DOM
Moderator: General Moderators
PHP DOM
has anyone written anything to save back from php objects?
the manual describes functions to read it in but say this is to be considered read only.
if not has anyone ideas on creating such a thing?
the manual describes functions to read it in but say this is to be considered read only.
if not has anyone ideas on creating such a thing?
Re: PHP DOM
Which part of the manual is it that says this? Based on the description of the unserialize function, it's possible to overcome possible issues relating to unserializing objects with the help of the unserialize_callback_func directive.d1223m wrote: the manual describes functions to read it in but say this is to be considered read only.
Check out these links for more data.
http://www.php.net/manual/en/function.unserialize.php
http://www.php.net/manual/en/language.o ... zation.php
This link here may be of some help as well.
http://www.webkreator.com/php/configura ... ading.html
Do some reading and experimenting. You'll get it!
Cheers,
BDKR
BDKR:
the "read-only" thing i was talking about is from http://www.php.net/manual/en/ref.domxml.php
the "read-only" thing i was talking about is from http://www.php.net/manual/en/ref.domxml.php
Im looking for opposite to xmltree, ie to turn a object tree into an xml file [/quote]The extension allows you to operate on an XML document with the DOM API. It also provides a function domxml_xmltree() to turn the complete XML document into a tree of PHP objects. Currently, this tree should be considered read-only — you can modify it, but this would not make any sense since DomDocument_dump_mem() cannot be applied to it. Therefore, if you want to read an XML file and write a modified version, use DomDocument_create_element()
ah sorry, I think we both missunderstood, sort of forgot about the subject and was thinkiong of PHP-objects only
hmm yes you are right, PHP-DOM is not superuseful, I did one project ones that would run thru each element and write them on the fly, but was fairly ineffecient, might as well just use arrays instead of DOM..
hmm yes you are right, PHP-DOM is not superuseful, I did one project ones that would run thru each element and write them on the fly, but was fairly ineffecient, might as well just use arrays instead of DOM..
ive been having fun looking thru the pear manual today.
here is pretty much what i wanted :
http://pear.php.net/manual/en/packages.xml.xml_tree.php
here is pretty much what i wanted :
http://pear.php.net/manual/en/packages.xml.xml_tree.php