msxml3: Implement get_xml.
This commit is contained in:
parent
cdac6b5005
commit
11331847ac
|
@ -685,8 +685,41 @@ static HRESULT WINAPI xmlnode_get_xml(
|
||||||
IXMLDOMNode *iface,
|
IXMLDOMNode *iface,
|
||||||
BSTR* xmlString)
|
BSTR* xmlString)
|
||||||
{
|
{
|
||||||
FIXME("\n");
|
xmlnode *This = impl_from_IXMLDOMNode( iface );
|
||||||
return E_NOTIMPL;
|
xmlBufferPtr pXmlBuf;
|
||||||
|
int nSize;
|
||||||
|
|
||||||
|
TRACE("iface %p\n", iface);
|
||||||
|
|
||||||
|
if(!xmlString)
|
||||||
|
return E_INVALIDARG;
|
||||||
|
|
||||||
|
*xmlString = NULL;
|
||||||
|
|
||||||
|
pXmlBuf = xmlBufferCreate();
|
||||||
|
if(pXmlBuf)
|
||||||
|
{
|
||||||
|
nSize = xmlNodeDump(pXmlBuf, This->node->doc, This->node, 0, 0);
|
||||||
|
if(nSize > 0)
|
||||||
|
{
|
||||||
|
const xmlChar *pContent;
|
||||||
|
|
||||||
|
/* Attribute Nodes return a space infront of their name */
|
||||||
|
pContent = xmlBufferContent(pXmlBuf);
|
||||||
|
if( ((char*)pContent)[0] == ' ')
|
||||||
|
*xmlString = bstr_from_xmlChar(pContent+1);
|
||||||
|
else
|
||||||
|
*xmlString = bstr_from_xmlChar(pContent);
|
||||||
|
|
||||||
|
|
||||||
|
xmlBufferFree(pXmlBuf);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Always returns a string. */
|
||||||
|
if(*xmlString == NULL) *xmlString = SysAllocStringLen( NULL, 0 );
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI xmlnode_transformNode(
|
static HRESULT WINAPI xmlnode_transformNode(
|
||||||
|
|
Loading…
Reference in New Issue