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
b2101b81
Commit
b2101b81
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 put_text.
parent
38f1733c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
2 deletions
+35
-2
node.c
dlls/msxml3/node.c
+23
-2
domdoc.c
dlls/msxml3/tests/domdoc.c
+12
-0
No files found.
dlls/msxml3/node.c
View file @
b2101b81
...
...
@@ -697,8 +697,29 @@ static HRESULT WINAPI xmlnode_put_text(
IXMLDOMNode
*
iface
,
BSTR
text
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
xmlnode
*
This
=
impl_from_IXMLDOMNode
(
iface
);
xmlChar
*
str
=
NULL
;
TRACE
(
"%p
\n
"
,
This
);
switch
(
This
->
node
->
type
)
{
case
XML_DOCUMENT_NODE
:
return
E_FAIL
;
default:
break
;
}
str
=
xmlChar_from_wchar
((
WCHAR
*
)
text
);
/* Escape the string. */
str
=
xmlEncodeEntitiesReentrant
(
This
->
node
->
doc
,
str
);
str
=
xmlEncodeSpecialChars
(
This
->
node
->
doc
,
str
);
xmlNodeSetContent
(
This
->
node
,
str
);
xmlFree
(
str
);
return
S_OK
;
}
static
HRESULT
WINAPI
xmlnode_get_specified
(
...
...
dlls/msxml3/tests/domdoc.c
View file @
b2101b81
...
...
@@ -142,6 +142,8 @@ static WCHAR szCommentNodeText[] = {'#','c','o','m','m','e','n','t',0 };
static
WCHAR
szElement
[]
=
{
'E'
,
'l'
,
'e'
,
'T'
,
'e'
,
's'
,
't'
,
0
};
static
WCHAR
szElementXML
[]
=
{
'<'
,
'E'
,
'l'
,
'e'
,
'T'
,
'e'
,
's'
,
't'
,
'/'
,
'>'
,
0
};
static
WCHAR
szElementXML2
[]
=
{
'<'
,
'E'
,
'l'
,
'e'
,
'T'
,
'e'
,
's'
,
't'
,
' '
,
'A'
,
't'
,
't'
,
'r'
,
'='
,
'"'
,
'"'
,
'/'
,
'>'
,
0
};
static
WCHAR
szElementXML3
[]
=
{
'<'
,
'E'
,
'l'
,
'e'
,
'T'
,
'e'
,
's'
,
't'
,
' '
,
'A'
,
't'
,
't'
,
'r'
,
'='
,
'"'
,
'"'
,
'>'
,
'T'
,
'e'
,
's'
,
't'
,
'i'
,
'n'
,
'g'
,
'N'
,
'o'
,
'd'
,
'e'
,
'<'
,
'/'
,
'E'
,
'l'
,
'e'
,
'T'
,
'e'
,
's'
,
't'
,
'>'
,
0
};
static
WCHAR
szAttribute
[]
=
{
'A'
,
't'
,
't'
,
'r'
,
0
};
static
WCHAR
szAttributeXML
[]
=
{
'A'
,
't'
,
't'
,
'r'
,
'='
,
'"'
,
'"'
,
0
};
...
...
@@ -444,6 +446,9 @@ static void test_domdoc( void )
ok
(
!
lstrcmpW
(
str
,
szDocument
),
"incorrect nodeName
\n
"
);
SysFreeString
(
str
);
/* test put_text */
r
=
IXMLDOMDocument_put_text
(
doc
,
_bstr_
(
"Should Fail"
)
);
ok
(
r
==
E_FAIL
,
"ret %08x
\n
"
,
r
);
/* check that there's a document element */
element
=
NULL
;
...
...
@@ -2030,6 +2035,13 @@ static void test_xmlTypes(void)
SysFreeString
(
str
);
}
hr
=
IXMLDOMElement_put_text
(
pElement
,
_bstr_
(
"TestingNode"
));
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
hr
=
IXMLDOMElement_get_xml
(
pElement
,
&
str
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
str
,
szElementXML3
),
"incorrect element xml
\n
"
);
IXMLDOMElement_Release
(
pElement
);
}
...
...
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