msxml3: Implmented IXMLDOMCDATASection_get_data.

This commit is contained in:
Alistair Leslie-Hughes 2008-03-01 22:54:33 +11:00 committed by Alexandre Julliard
parent c43b0706a3
commit 56da338e5c
2 changed files with 21 additions and 3 deletions

View File

@ -475,8 +475,20 @@ static HRESULT WINAPI domcdata_get_data(
IXMLDOMCDATASection *iface,
BSTR *p)
{
FIXME("\n");
return E_NOTIMPL;
domcdata *This = impl_from_IXMLDOMCDATASection( iface );
HRESULT hr = E_FAIL;
VARIANT vRet;
if(!p)
return E_INVALIDARG;
hr = IXMLDOMNode_get_nodeValue( This->element, &vRet );
if(hr == S_OK)
{
*p = V_BSTR(&vRet);
}
return hr;
}
static HRESULT WINAPI domcdata_put_data(

View File

@ -2389,12 +2389,18 @@ static void test_xmlTypes(void)
ok(hr == S_OK, "ret %08x\n", hr );
ok(len == 21, "expected 21 got %ld\n", len);
/* test length property */
/* test get nodeValue */
hr = IXMLDOMCDATASection_get_nodeValue(pComment, &var);
ok(hr == S_OK, "ret %08x\n", hr );
ok( !lstrcmpW( str, _bstr_("This &is a ; test <>\\") ), "incorrect text string\n");
VariantClear(&var);
/* test get data */
hr = IXMLDOMCDATASection_get_data(pComment, &str);
ok(hr == S_OK, "ret %08x\n", hr );
ok( !lstrcmpW( str, _bstr_("This &is a ; test <>\\") ), "incorrect text string\n");
SysFreeString(str);
IXMLDOMCDATASection_Release(pCDataSec);
}