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);
625 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
631 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
639 IUnknown_Release(
input);
641 IXmlReader_Release(
reader);
660 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
663 ok(
ref == 2,
"Expected 2, got %d\n",
ref);
666 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
668 hr = IUnknown_QueryInterface(reader_input, &IID_IStream, (
void**)&stream2);
671 hr = IUnknown_QueryInterface(reader_input, &IID_ISequentialStream, (
void**)&stream2);
676 ok(
ref == 3,
"Expected 3, got %d\n",
ref);
681 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
683 ref = IUnknown_AddRef(reader_input);
684 ok(
ref == 2,
"Expected 2, got %d\n",
ref);
685 IUnknown_Release(reader_input);
687 hr = IXmlReader_SetInput(
reader, reader_input);
688 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
693 hr = IXmlReader_GetNodeType(
reader, &nodetype);
698 ref = IUnknown_AddRef(reader_input);
699 ok(
ref == 3,
"Expected 3, got %d\n",
ref);
700 IUnknown_Release(reader_input);
703 ok(
ref == 4,
"Expected 4, got %d\n",
ref);
708 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
712 IXmlReader_Release(
reader);
715 ok(
ref == 3,
"Expected 3, got %d\n",
ref);
718 ref = IUnknown_AddRef(reader_input);
719 ok(
ref == 2,
"Expected 2, got %d\n",
ref);
720 IUnknown_Release(reader_input);
727 hr = IUnknown_QueryInterface(reader_input, &IID_IXmlReaderInput, (
void**)&
obj);
728 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
729 ref = IUnknown_AddRef(reader_input);
730 ok(
ref == 3,
"Expected 3, got %d\n",
ref);
731 IUnknown_Release(reader_input);
733 IUnknown_Release(reader_input);
734 IUnknown_Release(reader_input);
740 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
744 ok(
ref == 2,
"Expected 2, got %d\n",
ref);
745 IUnknown_Release(
input);
747 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
751 ok(
ref == 3,
"Expected 3, got %d\n",
ref);
752 IUnknown_Release(
input);
755 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
758 ref = IUnknown_AddRef(reader_input);
759 ok(
ref == 2,
"Expected 2, got %d\n",
ref);
760 IUnknown_Release(reader_input);
762 ok(
ref == 3,
"Expected 3, got %d\n",
ref);
763 IUnknown_Release(
input);
764 hr = IXmlReader_SetInput(
reader, reader_input);
771 ok(
ref == 3,
"Expected 3, got %d\n",
ref);
772 IUnknown_Release(
input);
774 ref = IUnknown_AddRef(reader_input);
776 "Expected 3, got %d\n",
ref);
777 IUnknown_Release(reader_input);
780 hr = IXmlReader_SetInput(
reader, reader_input);
786 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
791 hr = IXmlReader_SetInput(reader2, reader_input);
795 IXmlReader_Release(reader2);
796 IXmlReader_Release(
reader);
798 IUnknown_Release(reader_input);
799 IUnknown_Release(
input);
809 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
821 hr = IXmlReader_Read(
reader, &nodetype);
828 hr = IXmlReader_Read(
reader, &nodetype);
837 hr = IXmlReader_Read(
reader, &nodetype);
842 IXmlReader_Release(
reader);
850 IXmlReader_GetDepth(
reader, &
d);
858#define TEST_DEPTH(reader, depth) test_reader_depth(reader, depth, ~0u, __LINE__)
859#define TEST_DEPTH2(reader, depth, brk) test_reader_depth(reader, depth, brk, __LINE__)
869 { {
'v',
'e',
'r',
's',
'i',
'o',
'n',0}, {
'1',
'.',
'0',0} },
870 { {
'e',
'n',
'c',
'o',
'd',
'i',
'n',
'g',0}, {
'U',
'T',
'F',
'-',
'8',0} },
871 { {
's',
't',
'a',
'n',
'd',
'a',
'l',
'o',
'n',
'e',0}, {
'y',
'e',
's',0} }
882 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
887 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
894 hr = IXmlReader_MoveToElement(
reader);
897 hr = IXmlReader_MoveToNextAttribute(
reader);
900 hr = IXmlReader_MoveToFirstAttribute(
reader);
930 hr = IXmlReader_MoveToNextAttribute(
reader);
938 hr = IXmlReader_MoveToFirstAttribute(
reader);
963 hr = IXmlReader_MoveToNextAttribute(
reader);
991 ok(
hr ==
S_OK,
"expected S_OK, got %08x\n",
hr);
998 ok(
hr ==
S_OK,
"expected S_OK, got %08x\n",
hr);
1001 ret = IXmlReader_IsEmptyElement(
reader);
1002 ok(!
ret,
"element should not be empty\n");
1014 ok(
hr ==
S_OK,
"expected S_OK, got %08x\n",
hr);
1019 hr = IXmlReader_MoveToNextAttribute(
reader);
1027 ok(
hr ==
S_OK,
"expected S_OK, got %08x\n",
hr);
1030 ret = IXmlReader_IsEmptyElement(
reader);
1031 ok(
ret,
"element should be empty\n");
1046 IXmlReader_Release(
reader);
1059 {
"<!-- comment -->",
"",
" comment ",
S_OK },
1060 {
"<!-- - comment-->",
"",
" - comment",
S_OK },
1068 static const char *teststr =
"<a>text<!-- comment --></a>";
1097 ok(*
value != 0,
"Expected node value\n");
1108 if (
test->hr_broken)
1139 IXmlReader_Release(
reader);
1143 {
"<?pi?>",
"pi",
"",
S_OK },
1144 {
"<?pi ?>",
"pi",
"",
S_OK },
1145 {
"<?pi ?>",
"pi",
"",
S_OK },
1146 {
"<?pi pi data?>",
"pi",
"pi data",
S_OK },
1147 {
"<?pi pi data ?>",
"pi",
"pi data ",
S_OK },
1148 {
"<?pi data ?>",
"pi",
"data ",
S_OK },
1152 {
"<?xml-stylesheet ?>",
"xml-stylesheet",
"",
S_OK },
1173 if (
test->hr_broken)
1203 IXmlReader_Release(
reader);
1273 IXmlReader_Release(
reader);
1277 "<!DOCTYPE testdtd PUBLIC \"pubid\" \"externalid uri\" >";
1281 static const WCHAR dtdnameW[] = {
't',
'e',
's',
't',
'd',
't',
'd',0};
1303 hr = IXmlReader_MoveToFirstAttribute(
reader);
1335 IXmlReader_Release(
reader);
1339 "<!DOCTYPE testdtd SYSTEM \"externalid uri\" >"
1344 static const WCHAR dtdnameW[] = {
't',
'e',
's',
't',
'd',
't',
'd',0};
1366 hr = IXmlReader_MoveToFirstAttribute(
reader);
1391 IXmlReader_Release(
reader);
1395 {
"<a/>",
"a",
"",
S_OK },
1396 {
"<a />",
"a",
"",
S_OK },
1400 {
"<a>",
"a",
"",
S_OK },
1401 {
"<a >",
"a",
"",
S_OK },
1402 {
"<a \r \t\n>",
"a",
"",
S_OK },
1412 static const char stag[] =
1417 "<d attr4=\"_d\"></d>"
1420 static const UINT depths[] = { 0, 1, 2, 2, 2, 3, 2, 1 };
1436 if (
test->hr_broken)
1479 ok(
depth == depths[
i],
"%u: got depth %u, expected %u\n",
i,
depth, depths[
i]);
1483 const WCHAR *prefix;
1488 ok(prefix !=
NULL,
"got %p\n", prefix);
1500 hr = IXmlReader_GetQualifiedName(
reader, &qname,
NULL);
1502 ok(qname !=
NULL,
"got %p\n", qname);
1504 ok(
local == qname,
"expected same pointer\n");
1529 hr = IXmlReader_MoveToFirstAttribute(
reader);
1538 ok(
depth == depths[
i] + 1,
"%u: got depth %u, expected %u\n",
i,
depth, depths[
i] + 1);
1546 ok(
depth == depths[
i],
"%u: got depth %u, expected %u\n",
i,
depth, depths[
i]);
1564 IXmlReader_Release(
reader);
1596 value = (
void*)0xdeadbeef;
1602 IXmlReader_Release(
reader);
1632 hr = IXmlReader_ReadValueChunk(
reader, &
b, 1, &
c);
1634 ok(
c == 0,
"got %u\n",
c);
1635 ok(
b == 0,
"got %x\n",
b);
1640 ok(!
c,
"c = %u\n",
c);
1650 ok(!
c,
"c = %u\n",
c);
1656 ok(
c == 10,
"got %u\n",
c);
1657 ok(
buf[
c] == 0xcccc,
"buffer overflow\n");
1665 ok(!
c,
"got %u\n",
c);
1673 hr = IXmlReader_ReadValueChunk(
reader, &
b, 1, &
c);
1675 ok(
c == 0,
"got %u\n",
c);
1676 ok(
b == 0xffff,
"got %x\n",
b);
1680 IXmlReader_Release(
reader);
1684 {
"<a><![CDATA[ ]]data ]]></a>",
"",
" ]]data ",
S_OK },
1685 {
"<a><![CDATA[<![CDATA[ data ]]]]></a>",
"",
"<![CDATA[ data ]]",
S_OK },
1686 {
"<a><![CDATA[\n \r\n \n\n ]]></a>",
"",
"\n \n \n\n ",
S_OK,
S_OK },
1687 {
"<a><![CDATA[\r \r\r\n \n\n ]]></a>",
"",
"\n \n\n \n\n ",
S_OK,
S_OK },
1688 {
"<a><![CDATA[\r\r \n\r \r \n\n ]]></a>",
"",
"\n\n \n\n \n \n\n ",
S_OK },
1717 if (
test->hr_broken)
1754 IXmlReader_Release(
reader);
1758 {
"<a>simple text</a>",
"",
"simple text",
S_OK },
1760 {
"<a>\n \r\n \n\n text</a>",
"",
"\n \n \n\n text",
S_OK,
S_OK },
1761 {
"<a>\r \r\r\n \n\n text</a>",
"",
"\n \n\n \n\n text",
S_OK,
S_OK },
1823 IXmlReader_Release(
reader);
1832 {
"<a></a>",
FALSE },
1858 ret = IXmlReader_IsEmptyElement(
reader);
1864 IXmlReader_Release(
reader);
1868 {
"<a attr1=\"attrvalue\"/>",
"attr1",
"attrvalue",
S_OK },
1869 {
"<a attr1=\"a\'\'ttrvalue\"/>",
"attr1",
"a\'\'ttrvalue",
S_OK },
1870 {
"<a attr1=\'a\"ttrvalue\'/>",
"attr1",
"a\"ttrvalue",
S_OK },
1871 {
"<a attr1=\' \'/>",
"attr1",
" ",
S_OK },
1872 {
"<a attr1=\" \"/>",
"attr1",
" ",
S_OK },
1873 {
"<a attr1=\"\r\n \r \n \t\n\r\"/>",
"attr1",
" ",
S_OK },
1874 {
"<a attr1=\" val \"/>",
"attr1",
" val ",
S_OK },
1875 {
"<a attr1=\"\r\n\tval\n\"/>",
"attr1",
" val ",
S_OK },
1876 {
"<a attr1=\"val \"/>",
"attr1",
"val ",
S_OK },
1877 {
"<a attr1=\"val \"/>",
"attr1",
"val ",
S_OK },
1878 {
"<a attr1=\"<>&'"\"/>",
"attr1",
"<>&\'\"",
S_OK },
1908 if (
test->hr_broken)
1920 ok(
hr ==
S_OK,
"Failed to get node type, %#x\n",
hr);
1924 hr = IXmlReader_MoveToFirstAttribute(
reader);
1945 IXmlReader_Release(
reader);
1959 ok(
hr ==
S_OK,
"GetProperty failed: %08x\n",
hr);
1960 ok(
value == 256,
"Unexpected default max depth value %ld\n",
value);
1963 ok(
hr ==
S_OK,
"SetProperty failed: %08x\n",
hr);
1966 ok(
hr ==
S_OK,
"SetProperty failed: %08x\n",
hr);
1970 ok(
hr ==
S_OK,
"GetProperty failed: %08x\n",
hr);
1971 ok(
value == 0,
"Unexpected max depth value %ld\n",
value);
1973 IXmlReader_Release(
reader);
1981 const char *prefix1;
1982 const char *prefix2;
1983 const char *prefix3;
1986 {
"<b xmlns=\"defns\" xml:a=\"a ns\"/>",
"",
"",
"xml" },
1987 {
"<c:b xmlns:c=\"c ns\" xml:a=\"a ns\"/>",
"c",
"xmlns",
"xml" },
2007 hr = IXmlReader_MoveToFirstAttribute(
reader);
2008 ok(
hr ==
S_OK,
"MoveToFirstAttribute() failed, %#x.\n",
hr);
2011 ok(
hr ==
S_OK,
"GetNodeType() failed, %#x.\n",
hr);
2019 ok(
hr ==
S_OK,
"GetNodeType() failed, %#x.\n",
hr);
2029 IXmlReader_Release(
reader);
2040 {
"<a xmlns=\"defns a\"><b xmlns=\"defns b\"><c xmlns=\"defns c\"/></b></a>",
2041 {
"defns a",
"defns b",
"defns c",
"defns b",
"defns a" }},
2042 {
"<r:a xmlns=\"defns a\" xmlns:r=\"ns r\"/>",
2044 {
"<r:a xmlns=\"defns a\" xmlns:r=\"ns r\"><b/></r:a>",
2045 {
"ns r",
"defns a",
"ns r" }},
2046 {
"<a xmlns=\"defns a\" xmlns:r=\"ns r\"><r:b/></a>",
2047 {
"defns a",
"ns r",
"defns a" }},
2048 {
"<a><b><c/></b></a>",
2049 {
"",
"",
"",
"",
"" }},
2054 {
"<a><![CDATA[data]]></a>",
2056 {
"<?xml version=\"1.0\" ?><a/>",
2060 {
"<a><!-- comment --></a>",
2094 ok(
local !=
NULL,
"Unexpected NULL local name pointer\n");
2098 hr = IXmlReader_GetQualifiedName(
reader, &qname, &length2);
2100 ok(qname !=
NULL,
"Unexpected NULL qualified name pointer\n");
2107 ok(*
local != 0,
"Unexpected empty local name\n");
2108 ok(
length > 0,
"Unexpected local name length\n");
2110 ok(*qname != 0,
"Unexpected empty qualified name\n");
2111 ok(length2 > 0,
"Unexpected qualified name length\n");
2121 IXmlReader_Release(
reader);
2126 static const char testA[] =
"<a b=\"c\">dză></a>";
2127 static const WCHAR chardataW[] = {0x01f3,0x0103,
'>',0};
2158 IXmlReader_Release(
reader);
2163 static const struct encoding_testW
2169 { {
'<',
'?',
'p',
'i',
' ',
'?',
'>',0 } },
2170 { {
'<',
'!',
'-',
'-',
' ',
'c',
'-',
'-',
'>',0 } },
2171 { { 0xfeff,
'<',
'a',
'/',
'>',0 } },
2172 { {
'<',
'a',
'/',
'>',0 } },
2174 static const char *encoding_testsA[] =
2217 IXmlReader_Release(
reader);
2225 ok(IXmlReader_IsEOF(
reader) ==
eof,
"Unexpected IsEOF() result\n");
2227 ok(
hr ==
S_OK,
"GetProperty() failed, %#x\n",
hr);
2265 IXmlReader_Release(
reader);
2289 IXmlReader_Release(
reader);
2294 static const char *xml =
2361 hr = IXmlReader_MoveToFirstAttribute(
reader);
2368 hr = IXmlReader_Read(
reader, &nodetype);
2373 hr = IXmlReader_Read(
reader, &nodetype);
2392 IXmlReader_Release(
reader);
2397 static const char *xml =
"<c:a xmlns:c=\"nsdef c\" b=\"attr b\">\n</c:a>";
2416 hr = IXmlReader_GetLinePosition(
reader, &position);
2418 ok(position == 0,
"got %u\n", position);
2421 hr = IXmlReader_GetLineNumber(
reader, &position);
2423 ok(position == 0,
"got %u\n", position);
2458 IXmlReader_Release(
reader);
2463 const WCHAR *
ns, *nsq, *
empty, *xmlns_ns, *xmlns_name, *
name, *
p, *
q, *xml, *
ptr, *
value;
2483 win_skip(
"attr value is different than namespace pointer, assuming old xmllite\n");
2484 IXmlReader_Release(
reader);
2487 ok(
ns ==
ptr,
"ns != value\n");
2510 set_input_string(
reader,
"<elem xmlns:p=\"myns\" xmlns:q=\"mynsq\"><p:elem2 q:attr=\"\"></p:elem2></elem>");
2564 ok(
ns+1 ==
p,
"ns+1 != p\n");
2578 IXmlReader_Release(
reader);
2583 static const char *xml =
"<a><elem xmlns=\"myns\" a=\"value a\" b=\"value b\" xmlns:ns=\"ns uri\" "
2584 "ns:c=\"value c\" c=\"value c2\"/></a>";
2585 static const WCHAR xmlns_uriW[] = {
'h',
't',
't',
'p',
':',
'/',
'/',
'w',
'w',
'w',
'.',
'w',
'3',
'.',
'o',
'r',
'g',
'/',
2586 '2',
'0',
'0',
'0',
'/',
'x',
'm',
'l',
'n',
's',
'/',0};
2587 static const WCHAR nsuriW[] = {
'n',
's',
' ',
'u',
'r',
'i',0};
2588 static const WCHAR xmlnsW[] = {
'x',
'm',
'l',
'n',
's',0};
2589 static const WCHAR mynsW[] = {
'm',
'y',
'n',
's',0};
2590 static const WCHAR nsW[] = {
'n',
's',0};
2592 static const WCHAR aW[] = {
'a',0};
2593 static const WCHAR bW[] = {
'b',0};
2594 static const WCHAR cW[] = {
'c',0};
2599 ok(
hr ==
S_OK,
"Failed to create reader, hr %#x.\n",
hr);
2619 hr = IXmlReader_MoveToAttributeByName(
reader,
NULL, xmlns_uriW);
2622 hr = IXmlReader_MoveToAttributeByName(
reader,
emptyW, xmlns_uriW);
2628 hr = IXmlReader_MoveToAttributeByName(
reader,
xmlnsW, xmlns_uriW);
2636 hr = IXmlReader_MoveToAttributeByName(
reader, bW,
NULL);
2640 hr = IXmlReader_MoveToAttributeByName(
reader,
aW, mynsW);
2643 hr = IXmlReader_MoveToAttributeByName(
reader, nsW,
NULL);
2646 hr = IXmlReader_MoveToAttributeByName(
reader, nsW, xmlns_uriW);
2654 hr = IXmlReader_MoveToAttributeByName(
reader, cW,
NULL);
2658 hr = IXmlReader_MoveToAttributeByName(
reader, cW, nsuriW);
2662 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
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
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)
#define memcpy(s1, s2, n)
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::@1738 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