PHP_FUNCTION(domxml_node_name)
{
zval *id;
- xmlNode *n, *first;
+ xmlNode *n;
const char *str = NULL;
id = getThis();
{
zval *id;
xmlNode *nodep;
- int ret;
id = getThis();
if(NULL == (nodep = php_dom_get_object(id, le_domxmlnodep, 0)))
{
zval *id;
xmlNode *nodep;
- int ret;
id = getThis();
if(NULL == (nodep = php_dom_get_object(id, le_domxmlnodep, 0)))
Returns list of children nodes */
PHP_FUNCTION(domxml_node_children)
{
- zval *id, **tmp;
+ zval *id;
xmlNode *nodep, *last;
- xmlDoc *docp;
int ret;
id = getThis();
Deletes node */
PHP_FUNCTION(domxml_node_unlink_node)
{
- zval *id, **tmp;
- xmlNode *nodep, *last;
- int ret;
+ zval *id;
+ xmlNode *nodep;
id = getThis();
nodep = php_dom_get_object(id, le_domxmlnodep, 0);
Sets name of a node */
PHP_FUNCTION(domxml_node_set_name)
{
- zval *id, *name, **tmp;
+ zval *id, *name;
xmlNode *nodep;
if ((ZEND_NUM_ARGS() != 1) || getParameters(ht, 1, &name) == FAILURE) {
Returns list of attributes of node */
PHP_FUNCTION(domxml_node_attributes)
{
- zval *id, **tmp;
+ zval *id;
xmlNode *nodep;
#ifdef oldstyle_for_libxml_1_8_7
xmlAttr *attr;
Adds child node to parent node */
PHP_FUNCTION(domxml_node_new_child)
{
- zval *id, *name, *content, **tmp, *rv;
+ zval *id, *name, *content, *rv;
xmlNodePtr child, nodep;
int ret;
Set content of a node */
PHP_FUNCTION(domxml_node_set_content)
{
- zval *id, *content, **tmp;
+ zval *id, *content;
xmlNode *nodep;
if ((ZEND_NUM_ARGS() != 1) || getParameters(ht, 1, &content) == FAILURE) {
Returns tag name of element node */
PHP_FUNCTION(domxml_elem_tagname)
{
- zval *id, *arg1, **tmp;
+ zval *id;
xmlNode *nodep;
- char *value;
id = getThis();
nodep = php_dom_get_object(id, le_domxmlelementp, 0);
{
zval *id, *arg1;
xmlNode *nodep;
- char *value;
if ((ZEND_NUM_ARGS() == 1) && getParameters(ht, 1, &arg1) == SUCCESS) {
id = getThis();
/* FIXME: not implemented */
- RETURN_STRING(value, 1);
+ RETURN_TRUE;
}
/* }}} */
{
zval *id, *arg1;
xmlNode *nodep;
- char *value;
if ((ZEND_NUM_ARGS() == 1) && getParameters(ht, 1, &arg1) == SUCCESS) {
id = getThis();
Returns DomDocumentType */
PHP_FUNCTION(domxml_doc_doctype)
{
- zval *arg, *id, *rv;
+ zval *id, *rv;
xmlDtdPtr dtd;
xmlDocPtr docp;
int ret;
Returns DomeDOMImplementation */
PHP_FUNCTION(domxml_doc_implementation)
{
- zval *arg, *id, *rv;
- xmlNode *node;
+ zval *id;
xmlDocPtr docp;
- int ret;
id = getThis();
if(NULL == (docp = php_dom_get_object(id, le_domxmldocp, 0))) {
PHP_FUNCTION(domxml_doc_create_attribute)
{
zval *arg1, *arg2, *id, *rv;
- xmlNode *node;
+ xmlAttrPtr node;
xmlDocPtr docp;
int ret;
}
node->doc = docp;
- rv = php_domobject_new(node, &ret);
+ rv = php_domobject_new((xmlNodePtr) node, &ret);
SEPARATE_ZVAL(&rv);
*return_value = *rv;
}
Dumps document into string */
PHP_FUNCTION(domxml_dumpmem)
{
- zval *id, **tmp;
+ zval *id;
xmlDoc *docp;
xmlChar *mem;
int size;
Add string tocontent of a node */
PHP_FUNCTION(domxml_node_text_concat)
{
- zval *id, *content, **tmp;
+ zval *id, *content;
xmlNode *nodep;
if ((ZEND_NUM_ARGS() != 1) || getParameters(ht, 1, &content) == FAILURE) {
zval *id, *name, *rv;
xmlDoc *docp;
xmlNode *nodep;
- xmlChar *content;
int ret;
if (ZEND_NUM_ARGS() == 1 || getParameters(ht, 1, &name)) {
Returns list of children nodes */
static int node_attributes(zval **attributes, xmlNode *nodep)
{
- zval *children;
xmlAttr *attr;
int count = 0;
while(attr) {
zval *pattr;
- int n, ret;
+ int ret;
pattr = php_domobject_new((xmlNodePtr) attr, &ret);
// if(0 <= (n = node_children(&children, attr->children))) {
// zend_hash_update(pattr->value.obj.properties, "children", sizeof("children"), (void *) &children, sizeof(zval *), NULL);
// }
- add_property_string(pattr, "name", attr->name, 1);
- add_property_string(pattr, "value", xmlNodeGetContent(attr), 1);
+ add_property_string(pattr, "name", (char *) (attr->name), 1);
+ add_property_string(pattr, "value", xmlNodeGetContent((xmlNodePtr) attr), 1);
zend_hash_next_index_insert((*attributes)->value.ht, &pattr, sizeof(zval *), NULL);
attr = attr->next;
count++;
while(last) {
zval *child;
- xmlChar *content;
int ret;
child = php_domobject_new(last, &ret);
Thanks to Paul DuBois for pointing me at this.
*/
if(0 <= node_children(&children, root)) {
- int i, count;
- HashTable *lht;
zend_hash_update(return_value->value.obj.properties, "children", sizeof("children"), (void *) &children, sizeof(zval *), NULL);
}
for(i = 0;i < nodesetp->nodeNr;i++) {
xmlNodePtr node = nodesetp->nodeTab[i];
zval *child;
- xmlChar *content;
int retnode;
/* construct a node object */