msxml3: Implement IXMLDOMProcessingInstruction target.

This commit is contained in:
Alistair Leslie-Hughes 2008-02-16 22:02:40 +11:00 committed by Alexandre Julliard
parent 0d2f7322d3
commit 701991ca32
2 changed files with 15 additions and 2 deletions

View File

@ -433,8 +433,9 @@ static HRESULT WINAPI dom_pi_get_target(
IXMLDOMProcessingInstruction *iface,
BSTR *p)
{
FIXME("\n");
return E_NOTIMPL;
/* target returns the same value as nodeName property */
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
return IXMLDOMNode_get_nodeName( This->node, p );
}
static HRESULT WINAPI dom_pi_get_data(

View File

@ -618,6 +618,18 @@ static void test_domdoc( void )
ok( V_VT(&var) == VT_NULL, "incorrect dataType type\n");
VariantClear(&var);
/* test nodeName */
r = IXMLDOMProcessingInstruction_get_nodeName(nodePI, &str);
ok(r == S_OK, "ret %08x\n", r );
ok( !lstrcmpW( str, _bstr_("xml") ), "incorrect nodeName string\n");
SysFreeString(str);
/* test Target */
r = IXMLDOMProcessingInstruction_get_target(nodePI, &str);
ok(r == S_OK, "ret %08x\n", r );
ok( !lstrcmpW( str, _bstr_("xml") ), "incorrect target string\n");
SysFreeString(str);
/* test nodeTypeString */
r = IXMLDOMProcessingInstruction_get_nodeTypeString(nodePI, &str);
ok(r == S_OK, "ret %08x\n", r );