Is there any way/document/direction to access the under hood dom object which is created in php land from the c code inside php extensions?

something like this:

in the php code, I do:

$domdoc = new DOMDocument;
$domdoc->loadXML($strXMLData);
$domnode = $domdoc->firstChild;
//... some operations on dom, then I will call
func_implemented_in_php_extension($domdoc);


and in the c land of php extension, can i do:

PHP_MINIT_FUNCTION(func_implemented_in_php_extension)
{
//...
if (zend_parse_parameters(argc TSRMLS_CC, "z", &domdoc, &dom_len) ==FAILURE)


//...and I can continue to manipulete the dom object in c api, like
domnode = domdoc->firstChild();
domnode->set_content("hello world");
}

and later back to my php code,  I do

print($domdoc->firstchild->get_content());

and the out put is "hello world".

On other hand, any idea to do this in the reversed way, access underhood dom object which is created in c land of php extension from the php code?

Thanks!

Luise

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



Reply via email to