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
f57bf100
Commit
f57bf100
authored
Dec 28, 2006
by
Colin Pitrat
Committed by
Alexandre Julliard
Dec 29, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml: nextNode and reset functions.
parent
8990a7c7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
4 deletions
+50
-4
nodemap.c
dlls/msxml3/nodemap.c
+33
-4
domdoc.c
dlls/msxml3/tests/domdoc.c
+17
-0
No files found.
dlls/msxml3/nodemap.c
View file @
f57bf100
...
...
@@ -44,6 +44,7 @@ typedef struct _xmlnodemap
const
struct
ISupportErrorInfoVtbl
*
lpSEIVtbl
;
LONG
ref
;
IXMLDOMNode
*
node
;
long
iterator
;
}
xmlnodemap
;
static
inline
xmlnodemap
*
impl_from_IXMLDOMNamedNodeMap
(
IXMLDOMNamedNodeMap
*
iface
)
...
...
@@ -297,15 +298,42 @@ static HRESULT WINAPI xmlnodemap_nextNode(
IXMLDOMNamedNodeMap
*
iface
,
IXMLDOMNode
**
nextItem
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
xmlnodemap
*
This
=
impl_from_IXMLDOMNamedNodeMap
(
iface
);
xmlNodePtr
node
;
xmlAttrPtr
curr
;
long
attrIndex
;
TRACE
(
"%p %ld
\n
"
,
This
,
This
->
iterator
);
*
nextItem
=
NULL
;
node
=
xmlNodePtr_from_domnode
(
This
->
node
,
0
);
curr
=
node
->
properties
;
for
(
attrIndex
=
0
;
attrIndex
<
This
->
iterator
;
attrIndex
++
)
{
if
(
curr
->
next
==
NULL
)
return
S_FALSE
;
else
curr
=
curr
->
next
;
}
This
->
iterator
++
;
*
nextItem
=
create_node
(
(
xmlNodePtr
)
curr
);
return
S_OK
;
}
static
HRESULT
WINAPI
xmlnodemap_reset
(
IXMLDOMNamedNodeMap
*
iface
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
xmlnodemap
*
This
=
impl_from_IXMLDOMNamedNodeMap
(
iface
);
TRACE
(
"%p %ld
\n
"
,
This
,
This
->
iterator
);
This
->
iterator
=
0
;
return
S_OK
;
}
static
HRESULT
WINAPI
xmlnodemap__newEnum
(
...
...
@@ -389,6 +417,7 @@ IXMLDOMNamedNodeMap *create_nodemap( IXMLDOMNode *node )
nodemap
->
lpSEIVtbl
=
&
support_error_vtbl
;
nodemap
->
node
=
node
;
nodemap
->
ref
=
1
;
nodemap
->
iterator
=
0
;
IXMLDOMNode_AddRef
(
node
);
/* Since we AddRef a node here, we don't need to call xmldoc_add_ref() */
...
...
dlls/msxml3/tests/domdoc.c
View file @
f57bf100
...
...
@@ -442,6 +442,23 @@ todo_wine
ok
(
str
!=
NULL
,
"str is null
\n
"
);
ok
(
!
lstrcmpW
(
str
,
szdl
),
"incorrect node name
\n
"
);
SysFreeString
(
str
);
/* test sequential access of attributes */
node
=
NULL
;
r
=
IXMLDOMNamedNodeMap_nextNode
(
map
,
&
node
);
ok
(
r
==
S_OK
,
"nextNode (first time) wrong code
\n
"
);
ok
(
node
!=
NULL
,
"nextNode, should be attribute
\n
"
);
r
=
IXMLDOMNamedNodeMap_nextNode
(
map
,
&
node
);
ok
(
r
!=
S_OK
,
"nextNode (second time) wrong code
\n
"
);
ok
(
node
==
NULL
,
"nextNode, there is no attribute
\n
"
);
r
=
IXMLDOMNamedNodeMap_reset
(
map
);
ok
(
r
==
S_OK
,
"reset should return S_OK
\n
"
);
r
=
IXMLDOMNamedNodeMap_nextNode
(
map
,
&
node
);
ok
(
r
==
S_OK
,
"nextNode (third time) wrong code
\n
"
);
ok
(
node
!=
NULL
,
"nextNode, should be attribute
\n
"
);
}
else
ok
(
FALSE
,
"no map
\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