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
13606ed4
Commit
13606ed4
authored
Oct 28, 2008
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Oct 28, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Add support to get_nodeTypedValue on Element Nodes.
parent
9e4d6e61
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
89 additions
and
2 deletions
+89
-2
node.c
dlls/msxml3/node.c
+26
-2
domdoc.c
dlls/msxml3/tests/domdoc.c
+63
-0
No files found.
dlls/msxml3/node.c
View file @
13606ed4
...
@@ -977,8 +977,32 @@ static HRESULT WINAPI xmlnode_get_nodeTypedValue(
...
@@ -977,8 +977,32 @@ static HRESULT WINAPI xmlnode_get_nodeTypedValue(
IXMLDOMNode
*
iface
,
IXMLDOMNode
*
iface
,
VARIANT
*
typedValue
)
VARIANT
*
typedValue
)
{
{
FIXME
(
"ignoring data type
\n
"
);
xmlnode
*
This
=
impl_from_IXMLDOMNode
(
iface
);
return
xmlnode_get_nodeValue
(
iface
,
typedValue
);
HRESULT
r
=
S_FALSE
;
FIXME
(
"ignoring data type %p %p
\n
"
,
This
,
typedValue
);
if
(
!
typedValue
)
return
E_INVALIDARG
;
V_VT
(
typedValue
)
=
VT_NULL
;
switch
(
This
->
node
->
type
)
{
case
XML_ELEMENT_NODE
:
{
xmlChar
*
content
=
xmlNodeGetContent
(
This
->
node
);
V_VT
(
typedValue
)
=
VT_BSTR
;
V_BSTR
(
typedValue
)
=
bstr_from_xmlChar
(
content
);
xmlFree
(
content
);
r
=
S_OK
;
break
;
}
default:
r
=
xmlnode_get_nodeValue
(
iface
,
typedValue
);
}
return
r
;
}
}
static
HRESULT
WINAPI
xmlnode_put_nodeTypedValue
(
static
HRESULT
WINAPI
xmlnode_put_nodeTypedValue
(
...
...
dlls/msxml3/tests/domdoc.c
View file @
13606ed4
...
@@ -146,6 +146,10 @@ static const CHAR szTransformOutput[] =
...
@@ -146,6 +146,10 @@ static const CHAR szTransformOutput[] =
"Hello World"
"Hello World"
"</h1></body></html>"
;
"</h1></body></html>"
;
static
const
CHAR
szTypeValueXML
[]
=
"<?xml version=
\"
1.0
\"
encoding=
\"
utf-8
\"
?>"
"<string>Wine</string>"
;
static
const
WCHAR
szNonExistentFile
[]
=
{
static
const
WCHAR
szNonExistentFile
[]
=
{
'c'
,
':'
,
'\\'
,
'N'
,
'o'
,
'n'
,
'e'
,
'x'
,
'i'
,
's'
,
't'
,
'e'
,
'n'
,
't'
,
'.'
,
'x'
,
'm'
,
'l'
,
0
'c'
,
':'
,
'\\'
,
'N'
,
'o'
,
'n'
,
'e'
,
'x'
,
'i'
,
's'
,
't'
,
'e'
,
'n'
,
't'
,
'.'
,
'x'
,
'm'
,
'l'
,
0
};
};
...
@@ -3782,6 +3786,64 @@ static void test_FormattingXML(void)
...
@@ -3782,6 +3786,64 @@ static void test_FormattingXML(void)
free_bstrs
();
free_bstrs
();
}
}
static
void
test_NodeTypeValue
(
void
)
{
IXMLDOMDocument2
*
doc
=
NULL
;
IXMLDOMNode
*
pNode
;
VARIANT_BOOL
bSucc
;
HRESULT
hr
;
VARIANT
v
;
hr
=
CoCreateInstance
(
&
CLSID_DOMDocument
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IXMLDOMDocument2
,
(
LPVOID
*
)
&
doc
);
if
(
hr
!=
S_OK
)
return
;
hr
=
IXMLDOMDocument2_loadXML
(
doc
,
_bstr_
(
szTypeValueXML
),
&
bSucc
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
bSucc
==
VARIANT_TRUE
,
"Expected VARIANT_TRUE got VARIANT_FALSE
\n
"
);
if
(
bSucc
==
VARIANT_TRUE
)
{
hr
=
IXMLDOMDocument2_get_nodeValue
(
doc
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"ret %08x
\n
"
,
hr
);
V_VT
(
&
v
)
=
VT_BSTR
;
V_BSTR
(
&
v
)
=
NULL
;
hr
=
IXMLDOMDocument2_get_nodeValue
(
doc
,
&
v
);
ok
(
hr
==
S_FALSE
,
"ret %08x
\n
"
,
hr
);
ok
(
V_VT
(
&
v
)
==
VT_NULL
,
"expect VT_NULL got %d
\n
"
,
V_VT
(
&
v
));
hr
=
IXMLDOMDocument2_get_nodeTypedValue
(
doc
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"ret %08x
\n
"
,
hr
);
hr
=
IXMLDOMDocument2_get_nodeTypedValue
(
doc
,
&
v
);
ok
(
hr
==
S_FALSE
,
"ret %08x
\n
"
,
hr
);
hr
=
IXMLDOMDocument2_selectSingleNode
(
doc
,
_bstr_
(
"string"
),
&
pNode
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
{
V_VT
(
&
v
)
=
VT_BSTR
;
V_BSTR
(
&
v
)
=
NULL
;
hr
=
IXMLDOMNode_get_nodeValue
(
pNode
,
&
v
);
ok
(
hr
==
S_FALSE
,
"ret %08x
\n
"
,
hr
);
ok
(
V_VT
(
&
v
)
==
VT_NULL
,
"expect VT_NULL got %d
\n
"
,
V_VT
(
&
v
));
hr
=
IXMLDOMNode_get_nodeTypedValue
(
pNode
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"ret %08x
\n
"
,
hr
);
hr
=
IXMLDOMNode_get_nodeTypedValue
(
pNode
,
&
v
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
V_BSTR
(
&
v
),
_bstr_
(
"Wine"
)
),
"incorrect value
\n
"
);
IXMLDOMNode_Release
(
pNode
);
}
}
IXMLDOMDocument2_Release
(
doc
);
free_bstrs
();
}
START_TEST
(
domdoc
)
START_TEST
(
domdoc
)
{
{
HRESULT
r
;
HRESULT
r
;
...
@@ -3810,6 +3872,7 @@ START_TEST(domdoc)
...
@@ -3810,6 +3872,7 @@ START_TEST(domdoc)
test_testTransforms
();
test_testTransforms
();
test_Namespaces
();
test_Namespaces
();
test_FormattingXML
();
test_FormattingXML
();
test_NodeTypeValue
();
CoUninitialize
();
CoUninitialize
();
}
}
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