35DEFINE_GUID(IID_IXmlReaderInput, 0x0b3ccc9b, 0x9214, 0x428b, 0xa2, 0xae, 0xef, 0x3a, 0xa8, 0x71, 0xaf, 0xda);
58static const char xmldecl_full[] =
"\xef\xbb\xbf<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n";
59static const char xmldecl_short[] =
"<?xml version=\"1.0\"?><RegistrationInfo/>";
74 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
83 UINT pos_broken,
int _line_)
88 IXmlReader_GetLineNumber(
reader, &
l);
89 IXmlReader_GetLinePosition(
reader, &
p);
91 if (line_broken == ~0
u && pos_broken == ~0
u)
94 broken_state =
broken((line_broken == ~0
u ?
line : line_broken) ==
l &&
95 (pos_broken == ~0
u ?
pos : pos_broken) ==
p);
97 ok_(__FILE__, _line_)((
l ==
line &&
pos ==
p) || broken_state,
98 "Expected (%d,%d), got (%d,%d)\n",
line,
pos,
l,
p);
100#define TEST_READER_POSITION(reader, line, pos) \
101 test_reader_pos(reader, line, pos, ~0u, ~0u, __LINE__)
102#define TEST_READER_POSITION2(reader, line, pos, line_broken, pos_broken) \
103 test_reader_pos(reader, line, pos, line_broken, pos_broken, __LINE__)
111 &IID_IXmlReaderInput,
113 &IID_ISequentialStream,
119 &IID_IXmlReaderInput,
120 &IID_ISequentialStream,
128 &IID_ISequentialStream,
155#define ok_iids(got, exp, brk, todo) ok_iids_(got, exp, brk, todo, __LINE__)
159 static const char* state_names[] = {
160 "XmlReadState_Initial",
161 "XmlReadState_Interactive",
162 "XmlReadState_Error",
163 "XmlReadState_EndOfFile",
164 "XmlReadState_Closed"
167 static const char unknown[] =
"unknown";
176 return state_names[
state];
184 static const char* type_names[] = {
186 "XmlNodeType_Element",
187 "XmlNodeType_Attribute",
191 "XmlNodeType_ProcessingInstruction",
192 "XmlNodeType_Comment",
194 "XmlNodeType_DocumentType",
196 "XmlNodeType_Whitespace",
198 "XmlNodeType_EndElement",
200 "XmlNodeType_XmlDeclaration"
203 static const char unknown[] =
"unknown";
218 return type_names[
type];
224#define set_input_string(a,b) _set_input_string(__LINE__,a,b);
238#define read_node(a,b) _read_node(__LINE__,a,b)
249 ok_(__FILE__,
line)(
type == expected_type,
"read type %d, expected %d\n",
type, expected_type);
252#define next_attribute(a) _next_attribute(__LINE__,a)
256 hr = IXmlReader_MoveToNextAttribute(
reader);
257 ok_(__FILE__,
line)(
hr ==
S_OK,
"MoveToNextAttribute returned %08x\n",
hr);
260#define move_to_element(a) _move_to_element(__LINE__,a)
264 hr = IXmlReader_MoveToElement(
reader);
278 broken_state =
FALSE;
286#define TEST_READER_STATE(reader, state) test_read_state(reader, state, state, __LINE__)
287#define TEST_READER_STATE2(reader, state, brk) test_read_state(reader, state, brk, __LINE__)
289#define reader_value(a,b) _reader_value(__LINE__,a,b)
292 const WCHAR *
str = (
void*)0xdeadbeef;
303#define reader_name(a,b) _reader_name(__LINE__,a,b)
306 const WCHAR *
str = (
void*)0xdeadbeef;
317#define reader_prefix(a,b) _reader_prefix(__LINE__,a,b)
320 const WCHAR *
str = (
void*)0xdeadbeef;
331#define reader_namespace(a,b) _reader_namespace(__LINE__,a,b)
334 const WCHAR *
str = (
void*)0xdeadbeef;
345#define reader_qname(a,b) _reader_qname(a,b,__LINE__)
348 const WCHAR *
str = (
void*)0xdeadbeef;
353 ok_(__FILE__,
line)(
hr ==
S_OK,
"GetQualifiedName returned %08x\n",
hr);
359#define read_value_char(a,b) _read_value_char(a,b,__LINE__)
369 ok_(__FILE__,
line)(
c == expected_char,
"got %x\n",
c);
388 IUnknown_AddRef(iface);
434 *ppObj = &
input->IUnknown_iface;
465 static const char xml[] =
"<!-- comment -->";
473 *
pread =
sizeof(xml) / 2;
480 ok(0,
"unexpected call\n");
500 IXmlResolver_AddRef(iface);
521 ok(0,
"unexpected call\n");
559 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
560 hr = IUnknown_QueryInterface(unk, &IID_IXmlReader, (
void **)&
reader);
561 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
563 IXmlReader_Release(
reader);
564 IUnknown_Release(unk);
567 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
568 IXmlReader_Release(
reader);
571 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
576 hr = IXmlReader_GetNodeType(
reader, &nodetype);
587 resolver = (
void*)0xdeadbeef;
590 ok(resolver ==
NULL,
"got %p\n", resolver);
602 IXmlResolver_Release(resolver);
609 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
621 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
627 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
635 IUnknown_Release(
input);
637 IXmlReader_Release(
reader);
656 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
659 ok(
ref == 2,
"Expected 2, got %d\n",
ref);
662 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
664 hr = IUnknown_QueryInterface(reader_input, &IID_IStream, (
void**)&stream2);
667 hr = IUnknown_QueryInterface(reader_input, &IID_ISequentialStream, (
void**)&stream2);
672 ok(
ref == 3,
"Expected 3, got %d\n",
ref);
677 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
679 ref = IUnknown_AddRef(reader_input);
680 ok(
ref == 2,
"Expected 2, got %d\n",
ref);
681 IUnknown_Release(reader_input);
683 hr = IXmlReader_SetInput(
reader, reader_input);
684 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
689 hr = IXmlReader_GetNodeType(
reader, &nodetype);
694 ref = IUnknown_AddRef(reader_input);
695 ok(
ref == 3,
"Expected 3, got %d\n",
ref);
696 IUnknown_Release(reader_input);
699 ok(
ref == 4,
"Expected 4, got %d\n",
ref);
704 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
708 IXmlReader_Release(
reader);
711 ok(
ref == 3,
"Expected 3, got %d\n",
ref);
714 ref = IUnknown_AddRef(reader_input);
715 ok(
ref == 2,
"Expected 2, got %d\n",
ref);
716 IUnknown_Release(reader_input);
723 hr = IUnknown_QueryInterface(reader_input, &IID_IXmlReaderInput, (
void**)&
obj);
724 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
725 ref = IUnknown_AddRef(reader_input);
726 ok(
ref == 3,
"Expected 3, got %d\n",
ref);
727 IUnknown_Release(reader_input);
729 IUnknown_Release(reader_input);
730 IUnknown_Release(reader_input);
736 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
740 ok(
ref == 2,
"Expected 2, got %d\n",
ref);
741 IUnknown_Release(
input);
743 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
747 ok(
ref == 3,
"Expected 3, got %d\n",
ref);
748 IUnknown_Release(
input);
751 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
754 ref = IUnknown_AddRef(reader_input);
755 ok(
ref == 2,
"Expected 2, got %d\n",
ref);
756 IUnknown_Release(reader_input);
758 ok(
ref == 3,
"Expected 3, got %d\n",
ref);
759 IUnknown_Release(
input);
760 hr = IXmlReader_SetInput(
reader, reader_input);
767 ok(
ref == 3,
"Expected 3, got %d\n",
ref);
768 IUnknown_Release(
input);
770 ref = IUnknown_AddRef(reader_input);
772 "Expected 3, got %d\n",
ref);
773 IUnknown_Release(reader_input);
776 hr = IXmlReader_SetInput(
reader, reader_input);
782 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
787 hr = IXmlReader_SetInput(reader2, reader_input);
791 IXmlReader_Release(reader2);
792 IXmlReader_Release(
reader);
794 IUnknown_Release(reader_input);
795 IUnknown_Release(
input);
805 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
817 hr = IXmlReader_Read(
reader, &nodetype);
824 hr = IXmlReader_Read(
reader, &nodetype);
833 hr = IXmlReader_Read(
reader, &nodetype);
838 IXmlReader_Release(
reader);
846 IXmlReader_GetDepth(
reader, &
d);
854#define TEST_DEPTH(reader, depth) test_reader_depth(reader, depth, ~0u, __LINE__)
855#define TEST_DEPTH2(reader, depth, brk) test_reader_depth(reader, depth, brk, __LINE__)
865 { {
'v',
'e',
'r',
's',
'i',
'o',
'n',0}, {
'1',
'.',
'0',0} },
866 { {
'e',
'n',
'c',
'o',
'd',
'i',
'n',
'g',0}, {
'U',
'T',
'F',
'-',
'8',0} },
867 { {
's',
't',
'a',
'n',
'd',
'a',
'l',
'o',
'n',
'e',0}, {
'y',
'e',
's',0} }
878 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
883 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
890 hr = IXmlReader_MoveToElement(
reader);
893 hr = IXmlReader_MoveToNextAttribute(
reader);
896 hr = IXmlReader_MoveToFirstAttribute(
reader);
926 hr = IXmlReader_MoveToNextAttribute(
reader);
934 hr = IXmlReader_MoveToFirstAttribute(
reader);
959 hr = IXmlReader_MoveToNextAttribute(
reader);
987 ok(
hr ==
S_OK,
"expected S_OK, got %08x\n",
hr);
994 ok(
hr ==
S_OK,
"expected S_OK, got %08x\n",
hr);
998 ok(!
ret,
"element should not be empty\n");
1010 ok(
hr ==
S_OK,
"expected S_OK, got %08x\n",
hr);
1015 hr = IXmlReader_MoveToNextAttribute(
reader);
1023 ok(
hr ==
S_OK,
"expected S_OK, got %08x\n",
hr);
1026 ret = IXmlReader_IsEmptyElement(
reader);
1027 ok(
ret,
"element should be empty\n");
1042 IXmlReader_Release(
reader);
1055 {
"<!-- comment -->",
"",
" comment ",
S_OK },
1056 {
"<!-- - comment-->",
"",
" - comment",
S_OK },
1064 static const char *teststr =
"<a>text<!-- comment --></a>";
1093 ok(*
value != 0,
"Expected node value\n");
1104 if (
test->hr_broken)
1135 IXmlReader_Release(
reader);
1139 {
"<?pi?>",
"pi",
"",
S_OK },
1140 {
"<?pi ?>",
"pi",
"",
S_OK },
1141 {
"<?pi ?>",
"pi",
"",
S_OK },
1142 {
"<?pi pi data?>",
"pi",
"pi data",
S_OK },
1143 {
"<?pi pi data ?>",
"pi",
"pi data ",
S_OK },
1144 {
"<?pi data ?>",
"pi",
"data ",
S_OK },
1148 {
"<?xml-stylesheet ?>",
"xml-stylesheet",
"",
S_OK },
1169 if (
test->hr_broken)
1199 IXmlReader_Release(
reader);
1269 IXmlReader_Release(
reader);
1273 "<!DOCTYPE testdtd PUBLIC \"pubid\" \"externalid uri\" >";
1277 static const WCHAR dtdnameW[] = {
't',
'e',
's',
't',
'd',
't',
'd',0};
1299 hr = IXmlReader_MoveToFirstAttribute(
reader);
1331 IXmlReader_Release(
reader);
1335 "<!DOCTYPE testdtd SYSTEM \"externalid uri\" >"
1340 static const WCHAR dtdnameW[] = {
't',
'e',
's',
't',
'd',
't',
'd',0};
1362 hr = IXmlReader_MoveToFirstAttribute(
reader);
1387 IXmlReader_Release(
reader);
1391 {
"<a/>",
"a",
"",
S_OK },
1392 {
"<a />",
"a",
"",
S_OK },
1396 {
"<a>",
"a",
"",
S_OK },
1397 {
"<a >",
"a",
"",
S_OK },
1398 {
"<a \r \t\n>",
"a",
"",
S_OK },
1408 static const char stag[] =
1413 "<d attr4=\"_d\"></d>"
1416 static const UINT depths[] = { 0, 1, 2, 2, 2, 3, 2, 1 };
1432 if (
test->hr_broken)
1475 ok(
depth == depths[
i],
"%u: got depth %u, expected %u\n",
i,
depth, depths[
i]);
1479 const WCHAR *prefix;
1484 ok(prefix !=
NULL,
"got %p\n", prefix);
1496 hr = IXmlReader_GetQualifiedName(
reader, &qname,
NULL);
1498 ok(qname !=
NULL,
"got %p\n", qname);
1500 ok(
local == qname,
"expected same pointer\n");
1525 hr = IXmlReader_MoveToFirstAttribute(
reader);
1534 ok(
depth == depths[
i] + 1,
"%u: got depth %u, expected %u\n",
i,
depth, depths[
i] + 1);
1542 ok(
depth == depths[
i],
"%u: got depth %u, expected %u\n",
i,
depth, depths[
i]);
1560 IXmlReader_Release(
reader);
1592 value = (
void*)0xdeadbeef;
1598 IXmlReader_Release(
reader);
1628 hr = IXmlReader_ReadValueChunk(
reader, &
b, 1, &
c);
1630 ok(
c == 0,
"got %u\n",
c);
1631 ok(
b == 0,
"got %x\n",
b);
1636 ok(!
c,
"c = %u\n",
c);
1646 ok(!
c,
"c = %u\n",
c);
1652 ok(
c == 10,
"got %u\n",
c);
1653 ok(
buf[
c] == 0xcccc,
"buffer overflow\n");
1661 ok(!
c,
"got %u\n",
c);
1669 hr = IXmlReader_ReadValueChunk(
reader, &
b, 1, &
c);
1671 ok(
c == 0,
"got %u\n",
c);
1672 ok(
b == 0xffff,
"got %x\n",
b);
1676 IXmlReader_Release(
reader);
1680 {
"<a><![CDATA[ ]]data ]]></a>",
"",
" ]]data ",
S_OK },
1681 {
"<a><![CDATA[<![CDATA[ data ]]]]></a>",
"",
"<![CDATA[ data ]]",
S_OK },
1682 {
"<a><![CDATA[\n \r\n \n\n ]]></a>",
"",
"\n \n \n\n ",
S_OK,
S_OK },
1683 {
"<a><![CDATA[\r \r\r\n \n\n ]]></a>",
"",
"\n \n\n \n\n ",
S_OK,
S_OK },
1684 {
"<a><![CDATA[\r\r \n\r \r \n\n ]]></a>",
"",
"\n\n \n\n \n \n\n ",
S_OK },
1713 if (
test->hr_broken)
1750 IXmlReader_Release(
reader);
1754 {
"<a>simple text</a>",
"",
"simple text",
S_OK },
1756 {
"<a>\n \r\n \n\n text</a>",
"",
"\n \n \n\n text",
S_OK,
S_OK },
1757 {
"<a>\r \r\r\n \n\n text</a>",
"",
"\n \n\n \n\n text",
S_OK,
S_OK },
1819 IXmlReader_Release(
reader);
1828 {
"<a></a>",
FALSE },
1854 ret = IXmlReader_IsEmptyElement(
reader);
1860 IXmlReader_Release(
reader);
1864 {
"<a attr1=\"attrvalue\"/>",
"attr1",
"attrvalue",
S_OK },
1865 {
"<a attr1=\"a\'\'ttrvalue\"/>",
"attr1",
"a\'\'ttrvalue",
S_OK },
1866 {
"<a attr1=\'a\"ttrvalue\'/>",
"attr1",
"a\"ttrvalue",
S_OK },
1867 {
"<a attr1=\' \'/>",
"attr1",
" ",
S_OK },
1868 {
"<a attr1=\" \"/>",
"attr1",
" ",
S_OK },
1869 {
"<a attr1=\"\r\n \r \n \t\n\r\"/>",
"attr1",
" ",
S_OK },
1870 {
"<a attr1=\" val \"/>",
"attr1",
" val ",
S_OK },
1871 {
"<a attr1=\"\r\n\tval\n\"/>",
"attr1",
" val ",
S_OK },
1872 {
"<a attr1=\"val \"/>",
"attr1",
"val ",
S_OK },
1873 {
"<a attr1=\"val \"/>",
"attr1",
"val ",
S_OK },
1874 {
"<a attr1=\"<>&'"\"/>",
"attr1",
"<>&\'\"",
S_OK },
1904 if (
test->hr_broken)
1916 ok(
hr ==
S_OK,
"Failed to get node type, %#x\n",
hr);
1920 hr = IXmlReader_MoveToFirstAttribute(
reader);
1941 IXmlReader_Release(
reader);
1955 ok(
hr ==
S_OK,
"GetProperty failed: %08x\n",
hr);
1956 ok(
value == 256,
"Unexpected default max depth value %ld\n",
value);
1959 ok(
hr ==
S_OK,
"SetProperty failed: %08x\n",
hr);
1962 ok(
hr ==
S_OK,
"SetProperty failed: %08x\n",
hr);
1966 ok(
hr ==
S_OK,
"GetProperty failed: %08x\n",
hr);
1967 ok(
value == 0,
"Unexpected max depth value %ld\n",
value);
1969 IXmlReader_Release(
reader);
1977 const char *prefix1;
1978 const char *prefix2;
1979 const char *prefix3;
1982 {
"<b xmlns=\"defns\" xml:a=\"a ns\"/>",
"",
"",
"xml" },
1983 {
"<c:b xmlns:c=\"c ns\" xml:a=\"a ns\"/>",
"c",
"xmlns",
"xml" },
2003 hr = IXmlReader_MoveToFirstAttribute(
reader);
2004 ok(
hr ==
S_OK,
"MoveToFirstAttribute() failed, %#x.\n",
hr);
2007 ok(
hr ==
S_OK,
"GetNodeType() failed, %#x.\n",
hr);
2015 ok(
hr ==
S_OK,
"GetNodeType() failed, %#x.\n",
hr);
2025 IXmlReader_Release(
reader);
2036 {
"<a xmlns=\"defns a\"><b xmlns=\"defns b\"><c xmlns=\"defns c\"/></b></a>",
2037 {
"defns a",
"defns b",
"defns c",
"defns b",
"defns a" }},
2038 {
"<r:a xmlns=\"defns a\" xmlns:r=\"ns r\"/>",
2040 {
"<r:a xmlns=\"defns a\" xmlns:r=\"ns r\"><b/></r:a>",
2041 {
"ns r",
"defns a",
"ns r" }},
2042 {
"<a xmlns=\"defns a\" xmlns:r=\"ns r\"><r:b/></a>",
2043 {
"defns a",
"ns r",
"defns a" }},
2044 {
"<a><b><c/></b></a>",
2045 {
"",
"",
"",
"",
"" }},
2050 {
"<a><![CDATA[data]]></a>",
2052 {
"<?xml version=\"1.0\" ?><a/>",
2056 {
"<a><!-- comment --></a>",
2090 ok(
local !=
NULL,
"Unexpected NULL local name pointer\n");
2094 hr = IXmlReader_GetQualifiedName(
reader, &qname, &length2);
2096 ok(qname !=
NULL,
"Unexpected NULL qualified name pointer\n");
2103 ok(*
local != 0,
"Unexpected empty local name\n");
2104 ok(
length > 0,
"Unexpected local name length\n");
2106 ok(*qname != 0,
"Unexpected empty qualified name\n");
2107 ok(length2 > 0,
"Unexpected qualified name length\n");
2117 IXmlReader_Release(
reader);
2122 static const char testA[] =
"<a b=\"c\">dză></a>";
2123 static const WCHAR chardataW[] = {0x01f3,0x0103,
'>',0};
2154 IXmlReader_Release(
reader);
2159 static const struct encoding_testW
2165 { {
'<',
'?',
'p',
'i',
' ',
'?',
'>',0 } },
2166 { {
'<',
'!',
'-',
'-',
' ',
'c',
'-',
'-',
'>',0 } },
2167 { { 0xfeff,
'<',
'a',
'/',
'>',0 } },
2168 { {
'<',
'a',
'/',
'>',0 } },
2170 static const char *encoding_testsA[] =
2213 IXmlReader_Release(
reader);
2221 ok(IXmlReader_IsEOF(
reader) ==
eof,
"Unexpected IsEOF() result\n");
2223 ok(
hr ==
S_OK,
"GetProperty() failed, %#x\n",
hr);
2261 IXmlReader_Release(
reader);
2285 IXmlReader_Release(
reader);
2290 static const char *xml =
2357 hr = IXmlReader_MoveToFirstAttribute(
reader);
2364 hr = IXmlReader_Read(
reader, &nodetype);
2369 hr = IXmlReader_Read(
reader, &nodetype);
2388 IXmlReader_Release(
reader);
2393 static const char *xml =
"<c:a xmlns:c=\"nsdef c\" b=\"attr b\">\n</c:a>";
2412 hr = IXmlReader_GetLinePosition(
reader, &position);
2414 ok(position == 0,
"got %u\n", position);
2417 hr = IXmlReader_GetLineNumber(
reader, &position);
2419 ok(position == 0,
"got %u\n", position);
2454 IXmlReader_Release(
reader);
2459 const WCHAR *
ns, *nsq, *
empty, *xmlns_ns, *xmlns_name, *
name, *
p, *
q, *xml, *
ptr, *
value;
2479 win_skip(
"attr value is different than namespace pointer, assuming old xmllite\n");
2480 IXmlReader_Release(
reader);
2483 ok(
ns ==
ptr,
"ns != value\n");
2506 set_input_string(
reader,
"<elem xmlns:p=\"myns\" xmlns:q=\"mynsq\"><p:elem2 q:attr=\"\"></p:elem2></elem>");
2560 ok(
ns+1 ==
p,
"ns+1 != p\n");
2574 IXmlReader_Release(
reader);
2579 static const char *xml =
"<a><elem xmlns=\"myns\" a=\"value a\" b=\"value b\" xmlns:ns=\"ns uri\" "
2580 "ns:c=\"value c\" c=\"value c2\"/></a>";
2581 static const WCHAR xmlns_uriW[] = {
'h',
't',
't',
'p',
':',
'/',
'/',
'w',
'w',
'w',
'.',
'w',
'3',
'.',
'o',
'r',
'g',
'/',
2582 '2',
'0',
'0',
'0',
'/',
'x',
'm',
'l',
'n',
's',
'/',0};
2583 static const WCHAR nsuriW[] = {
'n',
's',
' ',
'u',
'r',
'i',0};
2584 static const WCHAR xmlnsW[] = {
'x',
'm',
'l',
'n',
's',0};
2585 static const WCHAR mynsW[] = {
'm',
'y',
'n',
's',0};
2586 static const WCHAR nsW[] = {
'n',
's',0};
2588 static const WCHAR aW[] = {
'a',0};
2589 static const WCHAR bW[] = {
'b',0};
2590 static const WCHAR cW[] = {
'c',0};
2595 ok(
hr ==
S_OK,
"Failed to create reader, hr %#x.\n",
hr);
2615 hr = IXmlReader_MoveToAttributeByName(
reader,
NULL, xmlns_uriW);
2618 hr = IXmlReader_MoveToAttributeByName(
reader,
emptyW, xmlns_uriW);
2624 hr = IXmlReader_MoveToAttributeByName(
reader,
xmlnsW, xmlns_uriW);
2632 hr = IXmlReader_MoveToAttributeByName(
reader, bW,
NULL);
2636 hr = IXmlReader_MoveToAttributeByName(
reader,
aW, mynsW);
2639 hr = IXmlReader_MoveToAttributeByName(
reader, nsW,
NULL);
2642 hr = IXmlReader_MoveToAttributeByName(
reader, nsW, xmlns_uriW);
2650 hr = IXmlReader_MoveToAttributeByName(
reader, cW,
NULL);
2654 hr = IXmlReader_MoveToAttributeByName(
reader, cW, nsuriW);
2658 IXmlReader_Release(
reader);
ACPI_SIZE strlen(const char *String)
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
#define InterlockedIncrement
#define InterlockedDecrement
static WCHAR unknown[MAX_STRING_RESOURCE_LEN]
static const WCHAR empty[]
#define MultiByteToWideChar
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM *ppstm)
HRESULT WINAPI CreateXmlReader(REFIID riid, void **obj, IMalloc *imalloc)
HRESULT WINAPI CreateXmlReaderInputWithEncodingName(IUnknown *stream, IMalloc *imalloc, LPCWSTR encoding, BOOL hint, LPCWSTR base_uri, IXmlReaderInput **ppInput)
GLint GLint GLsizei GLsizei GLsizei depth
GLuint GLuint GLsizei GLenum type
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLdouble GLdouble GLdouble r
GLdouble GLdouble GLdouble GLdouble q
GLboolean GLboolean GLboolean b
GLenum GLuint GLenum GLsizei const GLchar * buf
GLuint GLsizei GLsizei * length
GLenum GLenum GLenum input
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
LPVOID NTAPI GlobalLock(HGLOBAL hMem)
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
int WINAPI lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2)
#define memcpy(s1, s2, n)
#define expect(expected, got)
static const CHAR testA[]
static HMODULE MODULEINFO DWORD cb
#define todo_wine_if(is_todo)
static const uri_properties uri_tests[]
ssize_t pread(int fd, void *buf, size_t count, off_t offset)
static void test_read_element(void)
static void test_reader_pos(IXmlReader *reader, UINT line, UINT pos, UINT line_broken, UINT pos_broken, int _line_)
static void test_readerinput(void)
static void test_prefix(void)
static HRESULT WINAPI resolver_ResolveUri(IXmlResolver *iface, const WCHAR *base_uri, const WCHAR *public_id, const WCHAR *system_id, IUnknown **input)
static const IID * setinput_full_old[]
static HRESULT testinput_createinstance(void **ppObj)
static void test_eof_state(IXmlReader *reader, BOOL eof)
static ULONG WINAPI testinput_AddRef(IUnknown *iface)
static HRESULT WINAPI teststream_QueryInterface(ISequentialStream *iface, REFIID riid, void **obj)
static const char test_system_dtd[]
static void test_read_public_dtd(void)
#define reader_name(a, b)
static struct test_entry text_tests[]
#define read_value_char(a, b)
static void test_reader_state(void)
#define TEST_READER_STATE(reader, state)
#define TEST_DEPTH2(reader, depth, brk)
#define ok_iids(got, exp, brk, todo)
static void test_namespaceuri(void)
static void test_read_charref(void)
#define reader_value(a, b)
static HRESULT WINAPI teststream_Write(ISequentialStream *iface, const void *pv, ULONG cb, ULONG *written)
static HRESULT WINAPI testinput_QueryInterface(IUnknown *iface, REFIID riid, void **ppvObj)
static struct test_entry cdata_tests[]
static void test_endoffile(void)
static void test_read_full(void)
static ISequentialStream teststream
#define TEST_DEPTH(reader, depth)
static const char xmldecl_full[]
static int stream_readcall
#define reader_namespace(a, b)
static ULONG WINAPI teststream_AddRef(ISequentialStream *iface)
static void test_encoding_detection(void)
static HRESULT WINAPI resolver_QI(IXmlResolver *iface, REFIID riid, void **obj)
static const char misc_test_xml[]
static void _read_node(unsigned line, IXmlReader *reader, XmlNodeType expected_type)
#define TEST_READER_POSITION(reader, line, pos)
static void test_string_pointers(void)
static void test_attribute_by_name(void)
struct _testinput testinput
static const WCHAR * _reader_name(unsigned line, IXmlReader *reader, const char *expect)
static void test_read_system_dtd(void)
static const ISequentialStreamVtbl teststreamvtbl
#define TEST_READER_STATE2(reader, state, brk)
static void _read_value_char(IXmlReader *reader, WCHAR expected_char, unsigned line)
static void _next_attribute(unsigned line, IXmlReader *reader)
#define reader_prefix(a, b)
static ULONG WINAPI resolver_AddRef(IXmlResolver *iface)
static const IID * empty_seq[]
static const char * type_to_str(XmlNodeType type)
static const struct IUnknownVtbl testinput_vtbl
static ULONG WINAPI testinput_Release(IUnknown *iface)
static const WCHAR * _reader_namespace(unsigned line, IXmlReader *reader, const char *expect)
static IStream * create_stream_on_data(const void *data, unsigned int size)
static const char test_public_dtd[]
static const IID * setinput_readerinput[]
static const char xmldecl_short[]
static void test_isemptyelement(void)
static ULONG WINAPI resolver_Release(IXmlResolver *iface)
#define set_input_string(a, b)
static const WCHAR * _reader_prefix(unsigned line, IXmlReader *reader, const char *expect)
static ULONG WINAPI teststream_Release(ISequentialStream *iface)
static const IID * setinput_full[]
static HRESULT WINAPI teststream_Read(ISequentialStream *iface, void *pv, ULONG cb, ULONG *pread)
static void test_reader_position(void)
static const char * state_to_str(XmlReadState state)
static WCHAR * a2w(const char *str)
static void test_reader_depth(IXmlReader *reader, UINT depth, UINT brk, int line)
static struct nodes_test misc_test
static void test_read_state(IXmlReader *reader, XmlReadState expected, XmlReadState exp_broken, int line)
static void test_read_cdata(void)
static void test_reader_properties(void)
static void test_read_pi(void)
static void test_reader_create(void)
#define reader_qname(a, b)
static void _move_to_element(unsigned line, IXmlReader *reader)
static void test_read_pending(void)
static IXmlResolver testresolver
#define move_to_element(a)
#define next_attribute(a)
static void test_read_text(void)
static void test_max_element_depth(void)
#define TEST_READER_POSITION2(reader, line, pos, line_broken, pos_broken)
static struct test_entry pi_tests[]
static input_iids_t input_iids
static void test_read_comment(void)
static struct test_entry attributes_tests[]
static void free_str(WCHAR *str)
static void test_read_xmldeclaration(void)
static struct test_entry comment_tests[]
static void test_read_attribute(void)
static const IXmlResolverVtbl resolvervtbl
static const WCHAR * _reader_qname(IXmlReader *reader, const char *expect, unsigned line)
static const WCHAR * _reader_value(unsigned line, IXmlReader *reader, const char *expect)
static void test_readvaluechunk(void)
static int strcmp_wa(const WCHAR *str1, const char *stra)
static void ok_iids_(const input_iids_t *iids, const IID **expected, const IID **exp_broken, BOOL todo, int line)
static struct test_entry_empty empty_element_tests[]
static void _set_input_string(unsigned line, IXmlReader *reader, const char *xml)
static struct test_entry element_tests[]
static testinput * impl_from_IUnknown(IUnknown *iface)
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
#define IsEqualGUID(rguid1, rguid2)
#define IsEqualIID(riid1, riid2)
_Check_return_ _CRTIMP int __cdecl __cdecl eof(_In_ int _FileHandle)
static __inline const char * wine_dbgstr_guid(const GUID *id)
struct nodes_test::@1711 nodes[20]
#define CONTAINING_RECORD(address, type, field)
@ XmlReadState_Interactive
@ XmlReaderProperty_MultiLanguage
@ XmlReaderProperty_DtdProcessing
@ XmlReaderProperty_XmlResolver
@ XmlReaderProperty_MaxElementDepth
@ XmlReaderProperty_ReadState
@ XmlNodeType_ProcessingInstruction
@ XmlNodeType_XmlDeclaration
@ XmlNodeType_DocumentType