php-src/ext/soap/php_xml.h

80 lines
3.3 KiB
C
Raw Normal View History

2004-01-29 09:27:06 +00:00
/*
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
2014-01-03 03:08:10 +00:00
| Copyright (c) 1997-2014 The PHP Group |
2004-01-29 09:27:06 +00:00
+----------------------------------------------------------------------+
2006-01-01 12:51:34 +00:00
| This source file is subject to version 3.01 of the PHP license, |
2004-01-29 09:27:06 +00:00
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
2006-01-01 12:51:34 +00:00
| http://www.php.net/license/3_01.txt |
2004-01-29 09:27:06 +00:00
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
2004-01-29 11:51:11 +00:00
| Authors: Brad Lafountain <rodif_bl@yahoo.com> |
| Shane Caraveo <shane@caraveo.com> |
| Dmitry Stogov <dmitry@zend.com> |
2004-01-29 09:27:06 +00:00
+----------------------------------------------------------------------+
*/
/* $Id$ */
#ifndef PHP_SOAP_XML_H
#define PHP_SOAP_XML_H
#define get_attribute(node, name) get_attribute_ex(node, name, NULL)
#define get_node(node, name) get_node_ex(node, name, NULL)
#define get_node_recursive(node, name) get_node_recursive_ex(node, name, NULL)
#define get_node_with_attribute(node, name, attr, val) get_node_with_attribute_ex(node, name, NULL, attr, val, NULL)
#define get_node_with_attribute_recursive(node, name, attr, val) get_node_with_attribute_recursive_ex(node, name, NULL, attr, val, NULL)
2004-01-19 16:40:37 +00:00
#define node_is_equal(node, name) node_is_equal_ex(node, name, NULL)
#define attr_is_equal(node, name) attr_is_equal_ex(node, name, NULL)
2005-08-02 11:15:42 +00:00
xmlDocPtr soap_xmlParseFile(const char *filename TSRMLS_DC);
2004-02-05 09:28:09 +00:00
xmlDocPtr soap_xmlParseMemory(const void *buf, size_t size);
xmlNsPtr attr_find_ns(xmlAttrPtr node);
xmlNsPtr node_find_ns(xmlNodePtr node);
int attr_is_equal_ex(xmlAttrPtr node, char *name, char *ns);
int node_is_equal_ex(xmlNodePtr node, char *name, char *ns);
xmlAttrPtr get_attribute_ex(xmlAttrPtr node,char *name, char *ns);
xmlNodePtr get_node_ex(xmlNodePtr node,char *name, char *ns);
2004-01-13 15:58:01 +00:00
xmlNodePtr get_node_recursive_ex(xmlNodePtr node,char *name, char *ns);
xmlNodePtr get_node_with_attribute_ex(xmlNodePtr node, char *name, char *name_ns, char *attribute, char *value, char *attr_ns);
xmlNodePtr get_node_with_attribute_recursive_ex(xmlNodePtr node, char *name, char *name_ns, char *attribute, char *value, char *attr_ns);
2006-07-11 14:24:18 +00:00
int parse_namespace(const xmlChar *inval,char **value,char **namespace);
#define FOREACHATTRNODE(n,c,i) FOREACHATTRNODEEX(n,c,NULL,i)
#define FOREACHATTRNODEEX(n,c,ns,i) \
2004-01-13 15:58:01 +00:00
do { \
if (n == NULL) { \
break; \
} \
if (c) { \
i = get_attribute_ex(n,c,ns); \
2004-01-13 15:58:01 +00:00
} else { \
i = n; \
} \
if (i != NULL) { \
n = i;
#define FOREACHNODE(n,c,i) FOREACHNODEEX(n,c,NULL,i)
#define FOREACHNODEEX(n,c,ns,i) \
2004-01-13 15:58:01 +00:00
do { \
if (n == NULL) { \
break; \
} \
if (c) { \
i = get_node_ex(n,c,NULL); \
2004-01-13 15:58:01 +00:00
} else { \
i = n; \
} \
if(i != NULL) { \
n = i;
#define ENDFOREACH(n) \
} \
} while ((n = n->next));
#endif