msxml3: Implemented xmlnode_get_nodeTypedValue 'boolean' data type handling.

This commit is contained in:
Piotr Caban 2009-11-18 00:51:30 +01:00 committed by Alexandre Julliard
parent 47e037d4bb
commit 39f0504c86
2 changed files with 16 additions and 0 deletions

View File

@ -966,6 +966,8 @@ inline HRESULT VARIANT_from_xmlChar(xmlChar *str, VARIANT *v, BSTR type)
V_VT(v) = VT_I4;
else if(!lstrcmpiW(type, szFixed))
V_VT(v) = VT_CY;
else if(!lstrcmpiW(type, szBoolean))
V_VT(v) = VT_BOOL;
else
{
FIXME("Type handling not yet implemented\n");

View File

@ -155,6 +155,7 @@ static const CHAR szTypeValueXML[] =
" <number2 dt:dt=\"NUMbEr\">-3.71e3</number2>\n"
" <int dt:dt=\"int\">-13</int>\n"
" <fixed dt:dt=\"fixed.14.4\">7322.9371</fixed>\n"
" <bool dt:dt=\"boolean\">1</bool>\n"
"</root>";
static const CHAR szBasicTransformSSXMLPart1[] =
@ -4073,6 +4074,19 @@ static void test_NodeTypeValue(void)
IXMLDOMNode_Release(pNode);
}
hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/bool"), &pNode);
ok(hr == S_OK, "ret %08x\n", hr );
if(hr == S_OK)
{
hr = IXMLDOMNode_get_nodeTypedValue(pNode, &v);
ok(hr == S_OK, "ret %08x\n", hr );
ok(V_VT(&v) == VT_BOOL, "incorrect type\n");
ok(V_BOOL(&v) == VARIANT_TRUE, "incorrect value\n");
VariantClear( &v );
IXMLDOMNode_Release(pNode);
}
}
IXMLDOMDocument2_Release(doc);