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
300191d5
Commit
300191d5
authored
Jan 04, 2008
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Jan 04, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Implement createAttribute.
parent
2e3f5243
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
2 deletions
+33
-2
domdoc.c
dlls/msxml3/domdoc.c
+23
-2
domdoc.c
dlls/msxml3/tests/domdoc.c
+10
-0
No files found.
dlls/msxml3/domdoc.c
View file @
300191d5
...
...
@@ -981,8 +981,29 @@ static HRESULT WINAPI domdoc_createAttribute(
BSTR
name
,
IXMLDOMAttribute
**
attribute
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
domdoc
*
This
=
impl_from_IXMLDOMDocument2
(
iface
);
xmlNodePtr
xmlnode
;
xmlChar
*
xml_name
;
TRACE
(
"%p->(%s %p)
\n
"
,
iface
,
debugstr_w
(
name
),
attribute
);
if
(
!
attribute
)
return
E_INVALIDARG
;
*
attribute
=
NULL
;
xml_name
=
xmlChar_from_wchar
((
WCHAR
*
)
name
);
xmlnode
=
(
xmlNode
*
)
xmlNewProp
(
NULL
,
xml_name
,
NULL
);
HeapFree
(
GetProcessHeap
(),
0
,
xml_name
);
if
(
!
xmlnode
)
return
E_FAIL
;
xmlnode
->
doc
=
get_doc
(
This
);
*
attribute
=
(
IXMLDOMAttribute
*
)
create_attribute
(
xmlnode
);
return
S_OK
;
}
...
...
dlls/msxml3/tests/domdoc.c
View file @
300191d5
...
...
@@ -137,6 +137,8 @@ static const WCHAR szfn1_txt[] = {'f','n','1','.','t','x','t',0};
static
WCHAR
szComment
[]
=
{
'A'
,
' '
,
'C'
,
'o'
,
'm'
,
'm'
,
'e'
,
'n'
,
't'
,
0
};
static
WCHAR
szAttribute
[]
=
{
'A'
,
't'
,
't'
,
'r'
,
0
};
#define expect_bstr_eq_and_free(bstr, expect) { \
BSTR bstrExp = alloc_str_from_narrow(expect); \
ok(lstrcmpW(bstr, bstrExp) == 0, "String differs\n"); \
...
...
@@ -337,6 +339,7 @@ static void test_domdoc( void )
IXMLDOMNode
*
node
;
IXMLDOMText
*
nodetext
=
NULL
;
IXMLDOMComment
*
node_comment
=
NULL
;
IXMLDOMAttribute
*
node_attr
=
NULL
;
VARIANT_BOOL
b
;
VARIANT
var
;
BSTR
str
;
...
...
@@ -508,6 +511,13 @@ static void test_domdoc( void )
ok
(
r
==
S_OK
,
"returns %08x
\n
"
,
r
);
IXMLDOMText_Release
(
node_comment
);
/* test Create Attribute */
r
=
IXMLDOMDocument_createAttribute
(
doc
,
NULL
,
NULL
);
ok
(
r
==
E_INVALIDARG
,
"returns %08x
\n
"
,
r
);
r
=
IXMLDOMDocument_createAttribute
(
doc
,
szAttribute
,
&
node_attr
);
ok
(
r
==
S_OK
,
"returns %08x
\n
"
,
r
);
IXMLDOMText_Release
(
node_attr
);
r
=
IXMLDOMDocument_Release
(
doc
);
ok
(
r
==
0
,
"document ref count incorrect
\n
"
);
...
...
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