Commit 0d4db95d authored by Alistair Leslie-Hughes's avatar Alistair Leslie-Hughes Committed by Alexandre Julliard

msxml3: Implement IXMLDOMCDATASection_get_length.

parent be435c47
......@@ -501,8 +501,26 @@ static HRESULT WINAPI domcdata_get_length(
IXMLDOMCDATASection *iface,
long *len)
{
FIXME("\n");
return E_NOTIMPL;
domcdata *This = impl_from_IXMLDOMCDATASection( iface );
xmlnode *pDOMNode = impl_from_IXMLDOMNode( (IXMLDOMNode*)This->element );
xmlChar *pContent;
long nLength = 0;
TRACE("%p\n", iface);
if(!len)
return E_INVALIDARG;
pContent = xmlNodeGetContent(pDOMNode->node);
if(pContent)
{
nLength = xmlStrlen(pContent);
xmlFree(pContent);
}
*len = nLength;
return S_OK;
}
static HRESULT WINAPI domcdata_substringData(
......
......@@ -2315,6 +2315,11 @@ static void test_xmlTypes(void)
ok( !lstrcmpW( str, _bstr_("This &is a ; test <>\\") ), "incorrect text string\n");
SysFreeString(str);
/* test length property */
hr = IXMLDOMCDATASection_get_length(pComment, &len);
ok(hr == S_OK, "ret %08x\n", hr );
ok(len == 21, "expected 21 got %ld\n", len);
IXMLDOMCDATASection_Release(pCDataSec);
}
......
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