Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
055b5e44
Commit
055b5e44
authored
Jan 16, 2008
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Jan 16, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Implement get_nodeTypeString.
parent
b2101b81
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
101 additions
and
3 deletions
+101
-3
node.c
dlls/msxml3/node.c
+57
-2
domdoc.c
dlls/msxml3/tests/domdoc.c
+44
-1
No files found.
dlls/msxml3/node.c
View file @
055b5e44
...
@@ -646,8 +646,63 @@ static HRESULT WINAPI xmlnode_get_nodeTypeString(
...
@@ -646,8 +646,63 @@ static HRESULT WINAPI xmlnode_get_nodeTypeString(
IXMLDOMNode
*
iface
,
IXMLDOMNode
*
iface
,
BSTR
*
xmlnodeType
)
BSTR
*
xmlnodeType
)
{
{
FIXME
(
"
\n
"
);
xmlnode
*
This
=
impl_from_IXMLDOMNode
(
iface
);
return
E_NOTIMPL
;
const
xmlChar
*
str
;
TRACE
(
"%p
\n
"
,
This
);
if
(
!
xmlnodeType
)
return
E_INVALIDARG
;
if
(
!
This
->
node
)
return
E_FAIL
;
switch
(
This
->
node
->
type
)
{
case
XML_ATTRIBUTE_NODE
:
str
=
(
const
xmlChar
*
)
"attribute"
;
break
;
case
XML_CDATA_SECTION_NODE
:
str
=
(
const
xmlChar
*
)
"cdatasection"
;
break
;
case
XML_COMMENT_NODE
:
str
=
(
const
xmlChar
*
)
"comment"
;
break
;
case
XML_DOCUMENT_NODE
:
str
=
(
const
xmlChar
*
)
"document"
;
break
;
case
XML_DOCUMENT_FRAG_NODE
:
str
=
(
const
xmlChar
*
)
"documentfragment"
;
break
;
case
XML_ELEMENT_NODE
:
str
=
(
const
xmlChar
*
)
"element"
;
break
;
case
XML_ENTITY_NODE
:
str
=
(
const
xmlChar
*
)
"entity"
;
break
;
case
XML_ENTITY_REF_NODE
:
str
=
(
const
xmlChar
*
)
"entityreference"
;
break
;
case
XML_NOTATION_NODE
:
str
=
(
const
xmlChar
*
)
"notation"
;
break
;
case
XML_PI_NODE
:
str
=
(
const
xmlChar
*
)
"processinginstruction"
;
break
;
case
XML_TEXT_NODE
:
str
=
(
const
xmlChar
*
)
"text"
;
break
;
default:
FIXME
(
"nodeName not mapped correctly (%d)
\n
"
,
This
->
node
->
type
);
str
=
This
->
node
->
name
;
break
;
}
*
xmlnodeType
=
bstr_from_xmlChar
(
str
);
if
(
!*
xmlnodeType
)
return
S_FALSE
;
return
S_OK
;
}
}
static
HRESULT
WINAPI
xmlnode_get_text
(
static
HRESULT
WINAPI
xmlnode_get_text
(
...
...
dlls/msxml3/tests/domdoc.c
View file @
055b5e44
...
@@ -550,6 +550,12 @@ static void test_domdoc( void )
...
@@ -550,6 +550,12 @@ static void test_domdoc( void )
ok
(
V_VT
(
&
var
)
==
VT_NULL
,
"incorrect dataType type
\n
"
);
ok
(
V_VT
(
&
var
)
==
VT_NULL
,
"incorrect dataType type
\n
"
);
VariantClear
(
&
var
);
VariantClear
(
&
var
);
/* test nodeTypeString */
r
=
IXMLDOMText_get_nodeTypeString
(
nodetext
,
&
str
);
ok
(
r
==
S_OK
,
"ret %08x
\n
"
,
r
);
ok
(
!
lstrcmpW
(
str
,
_bstr_
(
"text"
)
),
"incorrect nodeTypeString string
\n
"
);
SysFreeString
(
str
);
IXMLDOMText_Release
(
nodetext
);
IXMLDOMText_Release
(
nodetext
);
}
}
SysFreeString
(
str
);
SysFreeString
(
str
);
...
@@ -569,7 +575,8 @@ static void test_domdoc( void )
...
@@ -569,7 +575,8 @@ static void test_domdoc( void )
r
=
IXMLDOMComment_get_lastChild
(
node_comment
,
&
nodeChild
);
r
=
IXMLDOMComment_get_lastChild
(
node_comment
,
&
nodeChild
);
ok
(
r
==
S_FALSE
,
"ret %08x
\n
"
,
r
);
ok
(
r
==
S_FALSE
,
"ret %08x
\n
"
,
r
);
ok
(
nodeChild
==
NULL
,
"pLastChild not NULL
\n
"
);
ok
(
nodeChild
==
NULL
,
"pLastChild not NULL
\n
"
);
IXMLDOMText_Release
(
node_comment
);
IXMLDOMComment_Release
(
node_comment
);
}
}
/* test Create Attribute */
/* test Create Attribute */
...
@@ -607,6 +614,12 @@ static void test_domdoc( void )
...
@@ -607,6 +614,12 @@ static void test_domdoc( void )
ok
(
V_VT
(
&
var
)
==
VT_NULL
,
"incorrect dataType type
\n
"
);
ok
(
V_VT
(
&
var
)
==
VT_NULL
,
"incorrect dataType type
\n
"
);
VariantClear
(
&
var
);
VariantClear
(
&
var
);
/* test nodeTypeString */
r
=
IXMLDOMProcessingInstruction_get_nodeTypeString
(
nodePI
,
&
str
);
ok
(
r
==
S_OK
,
"ret %08x
\n
"
,
r
);
ok
(
!
lstrcmpW
(
str
,
_bstr_
(
"processinginstruction"
)
),
"incorrect nodeTypeString string
\n
"
);
SysFreeString
(
str
);
IXMLDOMProcessingInstruction_Release
(
nodePI
);
IXMLDOMProcessingInstruction_Release
(
nodePI
);
}
}
...
@@ -1898,6 +1911,12 @@ static void test_xmlTypes(void)
...
@@ -1898,6 +1911,12 @@ static void test_xmlTypes(void)
ok
(
V_VT
(
&
v
)
==
VT_NULL
,
"incorrect dataType type
\n
"
);
ok
(
V_VT
(
&
v
)
==
VT_NULL
,
"incorrect dataType type
\n
"
);
VariantClear
(
&
v
);
VariantClear
(
&
v
);
/* test nodeTypeString */
hr
=
IXMLDOMDocument_get_nodeTypeString
(
doc
,
&
str
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
str
,
_bstr_
(
"document"
)
),
"incorrect nodeTypeString string
\n
"
);
SysFreeString
(
str
);
hr
=
IXMLDOMDocument_createElement
(
doc
,
_bstr_
(
"Testing"
),
&
pRoot
);
hr
=
IXMLDOMDocument_createElement
(
doc
,
_bstr_
(
"Testing"
),
&
pRoot
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
if
(
hr
==
S_OK
)
...
@@ -1920,6 +1939,12 @@ static void test_xmlTypes(void)
...
@@ -1920,6 +1939,12 @@ static void test_xmlTypes(void)
ok
(
hr
==
S_FALSE
,
"ret %08x
\n
"
,
hr
);
ok
(
hr
==
S_FALSE
,
"ret %08x
\n
"
,
hr
);
ok
(
pAttribs
==
NULL
,
"pAttribs not NULL
\n
"
);
ok
(
pAttribs
==
NULL
,
"pAttribs not NULL
\n
"
);
/* test nodeTypeString */
hr
=
IXMLDOMComment_get_nodeTypeString
(
pComment
,
&
str
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
str
,
_bstr_
(
"comment"
)
),
"incorrect nodeTypeString string
\n
"
);
SysFreeString
(
str
);
hr
=
IXMLDOMElement_appendChild
(
pRoot
,
(
IXMLDOMNode
*
)
pComment
,
NULL
);
hr
=
IXMLDOMElement_appendChild
(
pRoot
,
(
IXMLDOMNode
*
)
pComment
,
NULL
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
...
@@ -1949,6 +1974,12 @@ static void test_xmlTypes(void)
...
@@ -1949,6 +1974,12 @@ static void test_xmlTypes(void)
hr
=
IXMLDOMElement_appendChild
(
pRoot
,
(
IXMLDOMNode
*
)
pElement
,
NULL
);
hr
=
IXMLDOMElement_appendChild
(
pRoot
,
(
IXMLDOMNode
*
)
pElement
,
NULL
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
/* test nodeTypeString */
hr
=
IXMLDOMDocument_get_nodeTypeString
(
pElement
,
&
str
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
str
,
_bstr_
(
"element"
)
),
"incorrect nodeTypeString string
\n
"
);
SysFreeString
(
str
);
hr
=
IXMLDOMElement_get_nodeName
(
pElement
,
&
str
);
hr
=
IXMLDOMElement_get_nodeName
(
pElement
,
&
str
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
str
,
szElement
),
"incorrect element node Name
\n
"
);
ok
(
!
lstrcmpW
(
str
,
szElement
),
"incorrect element node Name
\n
"
);
...
@@ -2016,6 +2047,12 @@ static void test_xmlTypes(void)
...
@@ -2016,6 +2047,12 @@ static void test_xmlTypes(void)
ok
(
!
lstrcmpW
(
str
,
szAttribute
),
"incorrect attribute node Name
\n
"
);
ok
(
!
lstrcmpW
(
str
,
szAttribute
),
"incorrect attribute node Name
\n
"
);
SysFreeString
(
str
);
SysFreeString
(
str
);
/* test nodeTypeString */
hr
=
IXMLDOMAttribute_get_nodeTypeString
(
pAttrubute
,
&
str
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
str
,
_bstr_
(
"attribute"
)
),
"incorrect nodeTypeString string
\n
"
);
SysFreeString
(
str
);
hr
=
IXMLDOMAttribute_get_xml
(
pAttrubute
,
&
str
);
hr
=
IXMLDOMAttribute_get_xml
(
pAttrubute
,
&
str
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
str
,
szAttributeXML
),
"incorrect attribute xml
\n
"
);
ok
(
!
lstrcmpW
(
str
,
szAttributeXML
),
"incorrect attribute xml
\n
"
);
...
@@ -2092,6 +2129,12 @@ static void test_xmlTypes(void)
...
@@ -2092,6 +2129,12 @@ static void test_xmlTypes(void)
ok
(
V_VT
(
&
v
)
==
VT_NULL
,
"incorrect dataType type
\n
"
);
ok
(
V_VT
(
&
v
)
==
VT_NULL
,
"incorrect dataType type
\n
"
);
VariantClear
(
&
v
);
VariantClear
(
&
v
);
/* test nodeTypeString */
hr
=
IXMLDOMCDATASection_get_nodeTypeString
(
pCDataSec
,
&
str
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
str
,
_bstr_
(
"cdatasection"
)
),
"incorrect nodeTypeString string
\n
"
);
SysFreeString
(
str
);
IXMLDOMCDATASection_Release
(
pCDataSec
);
IXMLDOMCDATASection_Release
(
pCDataSec
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment