Exemplo n.º 1
0
Arquivo: text.c Projeto: bilboed/wine
static HRESULT WINAPI domtext_get_text(
    IXMLDOMText *iface,
    BSTR* p)
{
    domtext *This = impl_from_IXMLDOMText( iface );
    return IXMLDOMNode_get_text( IXMLDOMNode_from_impl(&This->node), p );
}
Exemplo n.º 2
0
wchar_t * kull_m_xml_getTextValue(IXMLDOMNode *pNode, PCWSTR name)
{
	wchar_t *result = NULL;
	IXMLDOMNode *pSingleNode, *pChild;
	BSTR bstrGeneric;

	if((IXMLDOMNode_selectSingleNode(pNode, (BSTR) name, &pSingleNode) == S_OK) && pSingleNode)
	{
		if((IXMLDOMNode_get_firstChild(pSingleNode, &pChild) == S_OK) && pChild)
		{
			if(IXMLDOMNode_get_text(pChild, &bstrGeneric) == S_OK)
			{
				kull_m_string_copy(&result, bstrGeneric);
				SysFreeString(bstrGeneric);
			}

		}





	}
	return result;
}
Exemplo n.º 3
0
static HRESULT WINAPI dom_pi_get_text(
    IXMLDOMProcessingInstruction *iface,
    BSTR* p)
{
    dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
    return IXMLDOMNode_get_text( This->node, p );
}
Exemplo n.º 4
0
static HRESULT WINAPI entityref_get_text(
    IXMLDOMEntityReference *iface,
    BSTR* p)
{
    entityref *This = impl_from_IXMLDOMEntityReference( iface );
    return IXMLDOMNode_get_text( IXMLDOMNode_from_impl(&This->node), p );
}
Exemplo n.º 5
0
Arquivo: cdata.c Projeto: r6144/wine
static HRESULT WINAPI domcdata_get_text(
    IXMLDOMCDATASection *iface,
    BSTR* p)
{
    domcdata *This = impl_from_IXMLDOMCDATASection( iface );
    return IXMLDOMNode_get_text( IXMLDOMNode_from_impl(&This->node), p );
}
Exemplo n.º 6
0
static HRESULT WINAPI domcomment_get_text(
    IXMLDOMComment *iface,
    BSTR* p)
{
    domcomment *This = impl_from_IXMLDOMComment( iface );
    return IXMLDOMNode_get_text( This->node, p );
}
Exemplo n.º 7
0
static HRESULT WINAPI domattr_get_text(
    IXMLDOMAttribute *iface,
    BSTR* p)
{
    domattr *This = impl_from_IXMLDOMAttribute( iface );
    return IXMLDOMNode_get_text( This->node, p );
}
Exemplo n.º 8
0
wchar_t * kull_m_xml_getAttribute(IXMLDOMNode *pNode, PCWSTR name)
{
	wchar_t *result = NULL;
	IXMLDOMNamedNodeMap *map;
	IXMLDOMNode *nAttr;
	BSTR bstrGeneric;
	long length, i;
	BOOL isMatch = FALSE;

	if(IXMLDOMNode_get_attributes(pNode, &map) == S_OK)
	{
		if(IXMLDOMNamedNodeMap_get_length(map, &length) == S_OK)
		{
			for(i = 0; (i < length) && !isMatch; i++)
			{
				if(IXMLDOMNamedNodeMap_get_item(map, i, &nAttr) == S_OK)
				{
					if(IXMLDOMNode_get_nodeName(nAttr, &bstrGeneric) == S_OK)
					{
						isMatch = (_wcsicmp(name, bstrGeneric) == 0);
						SysFreeString(bstrGeneric);
						if(isMatch)
						{
							if(IXMLDOMNode_get_text(nAttr, &bstrGeneric) == S_OK)
							{
								kull_m_string_copy(&result, bstrGeneric);
								SysFreeString(bstrGeneric);
							}
						}
					}
					IXMLDOMNode_Release(nAttr);
				}
			}
		}
		IXMLDOMNamedNodeMap_Release(map);
	}
	return result;
}