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
e989d48f
Commit
e989d48f
authored
Jan 14, 2008
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Jan 14, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Implement get_dataType.
parent
c3eda248
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
77 additions
and
2 deletions
+77
-2
node.c
dlls/msxml3/node.c
+42
-2
domdoc.c
dlls/msxml3/tests/domdoc.c
+35
-0
No files found.
dlls/msxml3/node.c
View file @
e989d48f
...
...
@@ -736,8 +736,48 @@ static HRESULT WINAPI xmlnode_get_dataType(
IXMLDOMNode
*
iface
,
VARIANT
*
dataTypeName
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
xmlnode
*
This
=
impl_from_IXMLDOMNode
(
iface
);
xmlChar
*
pVal
;
TRACE
(
"iface %p
\n
"
,
iface
);
if
(
!
dataTypeName
)
return
E_INVALIDARG
;
/* CDATA Section, Comment, Document, Document Fragment,
Entity, Notation, PI, and Text Node are non-typed. */
V_BSTR
(
dataTypeName
)
=
NULL
;
V_VT
(
dataTypeName
)
=
VT_NULL
;
switch
(
This
->
node
->
type
)
{
case
XML_ATTRIBUTE_NODE
:
FIXME
(
"NODE_ATTRIBUTE_NODE should return a valid value.
\n
"
);
break
;
case
XML_ELEMENT_NODE
:
pVal
=
xmlGetNsProp
(
This
->
node
,
(
xmlChar
*
)
"dt"
,
(
xmlChar
*
)
"urn:schemas-microsoft-com:datatypes"
);
if
(
pVal
)
{
V_VT
(
dataTypeName
)
=
VT_BSTR
;
V_BSTR
(
dataTypeName
)
=
bstr_from_xmlChar
(
pVal
);
xmlFree
(
pVal
);
}
break
;
case
XML_ENTITY_REF_NODE
:
FIXME
(
"XML_ENTITY_REF_NODE should return a valid value.
\n
"
);
break
;
default:
TRACE
(
"Type %d returning NULL
\n
"
,
This
->
node
->
type
);
}
/* non-typed nodes return S_FALSE */
if
(
V_VT
(
dataTypeName
)
==
VT_NULL
)
{
return
S_FALSE
;
}
return
S_OK
;
}
static
HRESULT
WINAPI
xmlnode_put_dataType
(
...
...
dlls/msxml3/tests/domdoc.c
View file @
e989d48f
...
...
@@ -531,6 +531,13 @@ static void test_domdoc( void )
r
=
IXMLDOMText_get_attributes
(
nodetext
,
&
pAttribs
);
ok
(
r
==
S_FALSE
,
"ret %08x
\n
"
,
r
);
ok
(
pAttribs
==
NULL
,
"pAttribs not NULL
\n
"
);
/* test get_dataType */
r
=
IXMLDOMText_get_dataType
(
nodetext
,
&
var
);
ok
(
r
==
S_FALSE
,
"ret %08x
\n
"
,
r
);
ok
(
V_VT
(
&
var
)
==
VT_NULL
,
"incorrect dataType type
\n
"
);
VariantClear
(
&
var
);
IXMLDOMText_Release
(
nodetext
);
}
SysFreeString
(
str
);
...
...
@@ -582,6 +589,12 @@ static void test_domdoc( void )
r
=
IXMLDOMProcessingInstruction_get_lastChild
(
nodePI
,
&
nodeChild
);
ok
(
r
==
S_FALSE
,
"ret %08x
\n
"
,
r
);
ok
(
nodeChild
==
NULL
,
"nodeChild not NULL
\n
"
);
r
=
IXMLDOMProcessingInstruction_get_dataType
(
nodePI
,
&
var
);
ok
(
r
==
S_FALSE
,
"ret %08x
\n
"
,
r
);
ok
(
V_VT
(
&
var
)
==
VT_NULL
,
"incorrect dataType type
\n
"
);
VariantClear
(
&
var
);
IXMLDOMProcessingInstruction_Release
(
nodePI
);
}
...
...
@@ -1828,6 +1841,7 @@ static void test_xmlTypes(void)
IXMLDOMNamedNodeMap
*
pAttribs
;
BSTR
str
;
IXMLDOMNode
*
pNextChild
=
(
IXMLDOMNode
*
)
0x1
;
/* Used for testing Siblings */
VARIANT
v
;
hr
=
CoCreateInstance
(
&
CLSID_DOMDocument
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IXMLDOMDocument2
,
(
LPVOID
*
)
&
doc
);
if
(
hr
!=
S_OK
)
...
...
@@ -1858,6 +1872,12 @@ static void test_xmlTypes(void)
ok
(
hr
==
S_FALSE
,
"ret %08x
\n
"
,
hr
);
ok
(
pAttribs
==
NULL
,
"pAttribs not NULL
\n
"
);
/* test get_dataType */
hr
=
IXMLDOMDocument_get_dataType
(
doc
,
&
v
);
ok
(
hr
==
S_FALSE
,
"ret %08x
\n
"
,
hr
);
ok
(
V_VT
(
&
v
)
==
VT_NULL
,
"incorrect dataType type
\n
"
);
VariantClear
(
&
v
);
hr
=
IXMLDOMDocument_createElement
(
doc
,
_bstr_
(
"Testing"
),
&
pRoot
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
...
...
@@ -1893,6 +1913,11 @@ static void test_xmlTypes(void)
ok
(
!
lstrcmpW
(
str
,
szCommentXML
),
"incorrect comment xml
\n
"
);
SysFreeString
(
str
);
hr
=
IXMLDOMComment_get_dataType
(
pComment
,
&
v
);
ok
(
hr
==
S_FALSE
,
"ret %08x
\n
"
,
hr
);
ok
(
V_VT
(
&
v
)
==
VT_NULL
,
"incorrect dataType type
\n
"
);
VariantClear
(
&
v
);
IXMLDOMComment_Release
(
pComment
);
}
...
...
@@ -1914,6 +1939,11 @@ static void test_xmlTypes(void)
ok
(
!
lstrcmpW
(
str
,
szElementXML
),
"incorrect element xml
\n
"
);
SysFreeString
(
str
);
hr
=
IXMLDOMElement_get_dataType
(
pElement
,
&
v
);
ok
(
hr
==
S_FALSE
,
"ret %08x
\n
"
,
hr
);
ok
(
V_VT
(
&
v
)
==
VT_NULL
,
"incorrect dataType type
\n
"
);
VariantClear
(
&
v
);
/* Attribute */
hr
=
IXMLDOMDocument_createAttribute
(
doc
,
szAttribute
,
&
pAttrubute
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
...
...
@@ -1971,6 +2001,11 @@ static void test_xmlTypes(void)
ok
(
!
lstrcmpW
(
str
,
szAttributeXML
),
"incorrect attribute xml
\n
"
);
SysFreeString
(
str
);
hr
=
IXMLDOMAttribute_get_dataType
(
pAttrubute
,
&
v
);
ok
(
hr
==
S_FALSE
,
"ret %08x
\n
"
,
hr
);
ok
(
V_VT
(
&
v
)
==
VT_NULL
,
"incorrect dataType type
\n
"
);
VariantClear
(
&
v
);
IXMLDOMAttribute_Release
(
pAttrubute
);
/* Check Element again with the Add Attribute*/
...
...
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