- Notifications
You must be signed in to change notification settings - Fork 7.8k
/
Copy pathphp_xml.h
76 lines (68 loc) · 3.14 KB
/
php_xml.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/*
+----------------------------------------------------------------------+
| Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| https://www.php.net/license/3_01.txt |
| 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. |
+----------------------------------------------------------------------+
| Authors: Brad Lafountain <rodif_bl@yahoo.com> |
| Shane Caraveo <shane@caraveo.com> |
| Dmitry Stogov <dmitry@php.net> |
+----------------------------------------------------------------------+
*/
#ifndefPHP_SOAP_XML_H
#definePHP_SOAP_XML_H
#defineget_attribute(node, name) get_attribute_ex(node, name, NULL)
#defineget_node(node, name) get_node_ex(node, name, NULL)
#defineget_node_recursive(node, name) get_node_recursive_ex(node, name, NULL)
#defineget_node_with_attribute(node, name, attr, val) get_node_with_attribute_ex(node, name, NULL, attr, val, NULL)
#defineget_node_with_attribute_recursive(node, name, attr, val) get_node_with_attribute_recursive_ex(node, name, NULL, attr, val, NULL)
#definenode_is_equal(node, name) node_is_equal_ex(node, name, NULL)
#defineattr_is_equal(node, name) attr_is_equal_ex(node, name, NULL)
xmlDocPtrsoap_xmlParseFile(constchar*filename);
xmlDocPtrsoap_xmlParseMemory(constvoid*buf, size_tsize);
xmlNsPtrattr_find_ns(xmlAttrPtrnode);
xmlNsPtrnode_find_ns(xmlNodePtrnode);
intattr_is_equal_ex(xmlAttrPtrnode, char*name, char*ns);
intnode_is_equal_ex(xmlNodePtrnode, char*name, char*ns);
xmlAttrPtrget_attribute_ex(xmlAttrPtrnode,char*name, char*ns);
xmlNodePtrget_node_ex(xmlNodePtrnode,char*name, char*ns);
xmlNodePtrget_node_recursive_ex(xmlNodePtrnode,char*name, char*ns);
xmlNodePtrget_node_with_attribute_ex(xmlNodePtrnode, char*name, char*name_ns, char*attribute, char*value, char*attr_ns);
xmlNodePtrget_node_with_attribute_recursive_ex(xmlNodePtrnode, char*name, char*name_ns, char*attribute, char*value, char*attr_ns);
voidparse_namespace(constxmlChar*inval, constchar**value, char**namespace);
#defineFOREACHATTRNODE(n,c,i) FOREACHATTRNODEEX(n,c,NULL,i)
#defineFOREACHATTRNODEEX(n,c,ns,i) \
do { \
if (n == NULL) { \
break; \
} \
if (c) { \
i = get_attribute_ex(n,c,ns); \
} else { \
i = n; \
} \
if (i != NULL) { \
n = i;
#defineFOREACHNODE(n,c,i) FOREACHNODEEX(n,c,NULL,i)
#defineFOREACHNODEEX(n,c,ns,i) \
do { \
if (n == NULL) { \
break; \
} \
if (c) { \
i = get_node_ex(n,c,NULL); \
} else { \
i = n; \
} \
if(i != NULL) { \
n = i;
#defineENDFOREACH(n) \
} \
} while ((n = n->next));
#endif