Back to index

php5  5.3.10
php_xml.h
Go to the documentation of this file.
00001 /*
00002   +----------------------------------------------------------------------+
00003   | PHP Version 5                                                        |
00004   +----------------------------------------------------------------------+
00005   | Copyright (c) 1997-2012 The PHP Group                                |
00006   +----------------------------------------------------------------------+
00007   | This source file is subject to version 3.01 of the PHP license,      |
00008   | that is bundled with this package in the file LICENSE, and is        |
00009   | available through the world-wide-web at the following url:           |
00010   | http://www.php.net/license/3_01.txt                                  |
00011   | If you did not receive a copy of the PHP license and are unable to   |
00012   | obtain it through the world-wide-web, please send a note to          |
00013   | license@php.net so we can mail you a copy immediately.               |
00014   +----------------------------------------------------------------------+
00015   | Authors: Brad Lafountain <rodif_bl@yahoo.com>                        |
00016   |          Shane Caraveo <shane@caraveo.com>                           |
00017   |          Dmitry Stogov <dmitry@zend.com>                             |
00018   +----------------------------------------------------------------------+
00019 */
00020 /* $Id: php_xml.h 321634 2012-01-01 13:15:04Z felipe $ */
00021 
00022 #ifndef PHP_SOAP_XML_H
00023 #define PHP_SOAP_XML_H
00024 
00025 #define get_attribute(node, name) get_attribute_ex(node, name, NULL)
00026 #define get_node(node, name) get_node_ex(node, name, NULL)
00027 #define get_node_recursive(node, name) get_node_recursive_ex(node, name, NULL)
00028 #define get_node_with_attribute(node, name, attr, val) get_node_with_attribute_ex(node, name, NULL, attr, val, NULL)
00029 #define get_node_with_attribute_recursive(node, name, attr, val) get_node_with_attribute_recursive_ex(node, name, NULL, attr, val, NULL)
00030 #define node_is_equal(node, name) node_is_equal_ex(node, name, NULL)
00031 #define attr_is_equal(node, name) attr_is_equal_ex(node, name, NULL)
00032 
00033 xmlDocPtr soap_xmlParseFile(const char *filename TSRMLS_DC);
00034 xmlDocPtr soap_xmlParseMemory(const void *buf, size_t size);
00035 
00036 xmlNsPtr attr_find_ns(xmlAttrPtr node);
00037 xmlNsPtr node_find_ns(xmlNodePtr node);
00038 int attr_is_equal_ex(xmlAttrPtr node, char *name, char *ns);
00039 int node_is_equal_ex(xmlNodePtr node, char *name, char *ns);
00040 xmlAttrPtr get_attribute_ex(xmlAttrPtr node,char *name, char *ns);
00041 xmlNodePtr get_node_ex(xmlNodePtr node,char *name, char *ns);
00042 xmlNodePtr get_node_recursive_ex(xmlNodePtr node,char *name, char *ns);
00043 xmlNodePtr get_node_with_attribute_ex(xmlNodePtr node, char *name, char *name_ns, char *attribute, char *value, char *attr_ns);
00044 xmlNodePtr get_node_with_attribute_recursive_ex(xmlNodePtr node, char *name, char *name_ns, char *attribute, char *value, char *attr_ns);
00045 int parse_namespace(const xmlChar *inval,char **value,char **namespace);
00046 
00047 #ifndef ZEND_ENGINE_2
00048 int php_stream_xmlIO_match_wrapper(const char *filename);
00049 void *php_stream_xmlIO_open_wrapper(const char *filename);
00050 int php_stream_xmlIO_read(void *context, char *buffer, int len);
00051 int php_stream_xmlIO_close(void *context);
00052 #endif
00053 
00054 #define FOREACHATTRNODE(n,c,i)      FOREACHATTRNODEEX(n,c,NULL,i)
00055 #define FOREACHATTRNODEEX(n,c,ns,i) \
00056        do { \
00057               if (n == NULL) { \
00058                      break; \
00059               } \
00060               if (c) { \
00061                      i = get_attribute_ex(n,c,ns); \
00062               } else { \
00063                      i = n; \
00064               } \
00065               if (i != NULL) { \
00066                      n = i;
00067 
00068 #define FOREACHNODE(n,c,i)      FOREACHNODEEX(n,c,NULL,i)
00069 #define FOREACHNODEEX(n,c,ns,i) \
00070        do { \
00071               if (n == NULL) { \
00072                      break; \
00073               } \
00074               if (c) { \
00075                      i = get_node_ex(n,c,NULL); \
00076               } else { \
00077                      i = n; \
00078               } \
00079               if(i != NULL) { \
00080                      n = i;
00081 
00082 #define ENDFOREACH(n) \
00083               } \
00084        } while ((n = n->next));
00085 
00086 #endif