~ubuntu-wine/ubuntu/lucid/wine1.2/wine1.2+winepulse

« back to all changes in this revision

Viewing changes to dlls/msxml3/element.c

  • Committer: Bazaar Package Importer
  • Author(s): Scott Ritchie
  • Date: 2010-02-02 11:15:03 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20100202111503-w4ayji21ei1ginjr
Tags: 1.1.37-0ubuntu1
* New upstream release
  - A number of fixes in AVI file support.
  - Several MSXML improvements.
  - A few MSI fixes.
  - Various bug fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
598
598
    IXMLDOMElement *iface,
599
599
    BSTR p)
600
600
{
601
 
    FIXME("\n");
602
 
    return E_NOTIMPL;
 
601
    domelem *This = impl_from_IXMLDOMElement( iface );
 
602
    IXMLDOMNamedNodeMap *attr;
 
603
    HRESULT hr;
 
604
 
 
605
    TRACE("(%p)->(%s)", This, debugstr_w(p));
 
606
 
 
607
    hr = IXMLDOMElement_get_attributes(iface, &attr);
 
608
    if (hr != S_OK) return hr;
 
609
 
 
610
    hr = IXMLDOMNamedNodeMap_removeNamedItem(attr, p, NULL);
 
611
    IXMLDOMNamedNodeMap_Release(attr);
 
612
 
 
613
    return hr;
603
614
}
604
615
 
605
616
static HRESULT WINAPI domelem_getAttributeNode(
666
677
    IXMLDOMElement *iface,
667
678
    BSTR bstrName, IXMLDOMNodeList** resultList)
668
679
{
 
680
    static const WCHAR xpathformat[] =
 
681
            { '.','/','/','*','[','l','o','c','a','l','-','n','a','m','e','(',')','=','\'','%','s','\'',']',0 };
669
682
    domelem *This = impl_from_IXMLDOMElement( iface );
670
683
    LPWSTR szPattern;
671
684
    xmlNodePtr element;
673
686
 
674
687
    TRACE("(%p)->(%s,%p)\n", This, debugstr_w(bstrName), resultList);
675
688
 
676
 
    szPattern = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*(3+lstrlenW(bstrName)+1));
677
 
    szPattern[0] = '.';
678
 
    szPattern[1] = szPattern[2] = '/';
679
 
    lstrcpyW(szPattern+3, bstrName);
 
689
    if (bstrName[0] == '*' && bstrName[1] == 0)
 
690
    {
 
691
        szPattern = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*5);
 
692
        szPattern[0] = '.';
 
693
        szPattern[1] = szPattern[2] = '/';
 
694
        szPattern[3] = '*';
 
695
        szPattern[4] = 0;
 
696
    }
 
697
    else
 
698
    {
 
699
        szPattern = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*(21+lstrlenW(bstrName)+1));
 
700
        wsprintfW(szPattern, xpathformat, bstrName);
 
701
    }
680
702
    TRACE("%s\n", debugstr_w(szPattern));
681
703
 
682
704
    element = get_element(This);