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 #ifndef TEST_XML_H
30 #define TEST_XML_H
31
32 #include "../public/nsapi.h"
33 #include "test.h"
34
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38
39 UCX_TEST(test_wsxml_iterator);
40 UCX_TEST(test_wsxml_get_required_namespaces);
41 UCX_TEST(test_wsxml_write_nodes);
42 UCX_TEST(test_wsxml_nslist2string);
43 UCX_TEST(test_wsxml_string2nslist);
44
45
46 #define XML_TESTDATA1 "<?xml version=\"1.0\" encoding=\"utf-8\" ?> \
47 <test> \
48 <elm1>teststr</elm1> \
49 <!-- comment -->\
50 <elm2 /> \
51 <c> \
52 <a>hello</a> \
53 world\
54 <d><e><b/></e></d>\
55 </c> \
56 <x><z/></x> \
57 </test>"
58
59 #define XML_TESTDATA2 "<?xml version=\"1.0\" encoding=\"utf-8\" ?> \
60 <root><wrapper><test> \
61 <elm1>teststr</elm1> \
62 <!-- comment -->\
63 <elm2 /> \
64 <c> \
65 <a>hello</a> \
66 world\
67 <d><e><b/></e></d>\
68 </c> \
69 <x><z/></x> \
70 </test><nextelm/></wrapper><ignore/></root>"
71
72 #define XML_TESTDATA3 "<?xml version=\"1.0\" encoding=\"utf-8\" ?> \
73 <x1:prop \
74 xmlns:x1=\"http://example.com/ns1/\" \
75 xmlns:x2=\"http://example.com/ns2/\" \
76 xmlns:x3=\"http://example.com/ns_0/\" \
77 xmlns:x4=\"http://example.com/ns_0/\" > \
78 <x1:elm1>str1</x1:elm1>\
79 <x2:elm2>str1</x2:elm2>\
80 <x3:elm3>str1</x3:elm3>\
81 <x4:elm4>str1</x4:elm4>\
82 </x1:prop>"
83
84 #define XML_TESTDATA4 "<?xml version=\"1.0\" encoding=\"utf-8\" ?> \
85 <x1:prop \
86 xmlns:x1=\"http://example.com/ns1/\" \
87 xmlns:x2=\"http://example.com/ns2/\" \
88 xmlns:x3=\"http://example.com/ns_0/\" \
89 xmlns:x4=\"http://example.com/ns_0/\" >\
90 <x1:elm1>str1</x1:elm1>\
91 <x2:elm2>str1</x2:elm2>\
92 </x1:prop>"
93
94 #define XML_TESTDATA5 "<?xml version=\"1.0\" encoding=\"utf-8\" ?> \
95 <x1:prop \
96 xmlns:x1=\"http://example.com/ns1/\" \
97 xmlns:x2=\"http://example.com/ns2/\" > \
98 <x1:elm1>str1</x1:elm1>\
99 <x2:elm2>str1</x2:elm2>\
100 <x3:elm3 xmlns:x3=\"http://example.com/ns_0/\" >str1</x3:elm3>\
101 <x4:elm4 xmlns:x4=\"http://example.com/ns_0/\" >str1</x4:elm4>\
102 </x1:prop>"
103
104 #define XML_TESTDATA6 "<?xml version=\"1.0\" encoding=\"utf-8\" ?> \n\
105 <x1:test \n\
106 xmlns:x1=\"http://example.com/ns1/\" \n\
107 xmlns:x2=\"http://example.com/ns2/\" > \n\
108 <x1:elm1>str1</x1:elm1>\n\
109 <x2:elm2>str1</x2:elm2>\n\
110 <x3:elm3 xmlns:x3=\"http://example.com/ns_0/\" >str1</x3:elm3>\n\
111 <x1:sub> \n\
112 <x1:a attr1=\"val1\"/> \n\
113 <x1:a attr2=\"val2\">text</x1:a>\n\
114 <x1:b x2:nsattr=\"nsval\"><x1:c/></x1:b>\n\
115 </x1:sub> \n\
116 <x1:newns xmlns:x4=\"http://example.com/0/\" x4:attr3=\"val3\">\n\
117 </x1:newns>\n\
118 <x1:text>Hello\n\
119 World\n\
120 end.\n\
121 </x1:text>\n\
122 <x1:entityref ea=\"test & value\">\n\
123 entity reference test &quote& \n\
124 <xml>\n\
125 </x1:entityref>\n\
126 </x1:test>\n"
127
128 #ifdef __cplusplus
129 }
130 #endif
131
132 #endif
133
134