Commit 70028b7d authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

xmllite/reader: Return empty value for elements.

parent 7c44c65e
......@@ -2244,6 +2244,7 @@ static HRESULT reader_parse_element(xmlreader *reader)
reader_set_strvalue(reader, StringValue_Prefix, &prefix);
reader_set_strvalue(reader, StringValue_LocalName, &local);
reader_set_strvalue(reader, StringValue_QualifiedName, &qname);
reader_set_strvalue(reader, StringValue_Value, &strval_empty);
break;
}
default:
......@@ -2899,6 +2900,7 @@ static HRESULT WINAPI xmlreader_MoveToElement(IXmlReader* iface)
reader_set_strvalue(This, StringValue_QualifiedName, &element->qname);
}
}
reader_set_strvalue(This, StringValue_Value, &strval_empty);
return S_OK;
}
......
......@@ -909,7 +909,6 @@ todo_wine {
hr = IXmlReader_GetValue(reader, &val, NULL);
ok(hr == S_OK, "expected S_OK, got %08x\n", hr);
todo_wine
ok(*val == 0, "got %s\n", wine_dbgstr_w(val));
hr = IXmlReader_GetLocalName(reader, &val, NULL);
......@@ -1473,9 +1472,17 @@ static void test_read_element(void)
/* moving to attributes increases depth */
if (count)
{
const WCHAR *value;
hr = IXmlReader_GetValue(reader, &value, NULL);
ok(*value == 0, "Unexpected value %s\n", wine_dbgstr_w(value));
hr = IXmlReader_MoveToFirstAttribute(reader);
ok(hr == S_OK, "got %08x\n", hr);
hr = IXmlReader_GetValue(reader, &value, NULL);
ok(*value != 0, "Unexpected value %s\n", wine_dbgstr_w(value));
depth = 123;
hr = IXmlReader_GetDepth(reader, &depth);
ok(hr == S_OK, "got %08x\n", hr);
......@@ -1484,6 +1491,9 @@ static void test_read_element(void)
hr = IXmlReader_MoveToElement(reader);
ok(hr == S_OK, "got %08x\n", hr);
hr = IXmlReader_GetValue(reader, &value, NULL);
ok(*value == 0, "Unexpected value %s\n", wine_dbgstr_w(value));
depth = 123;
hr = IXmlReader_GetDepth(reader, &depth);
ok(hr == S_OK, "got %08x\n", hr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment