Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
3d0c6627
Commit
3d0c6627
authored
Nov 05, 2005
by
Huw Davies
Committed by
Alexandre Julliard
Nov 05, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Filter out CTEXT nodes when building element child lists.
get_item and get_length should honour the filter. Add some '\n's to the tests so that libxml2 lists CTEXT nodes.
parent
cd1b13fb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
22 deletions
+46
-22
node.c
dlls/msxml3/node.c
+16
-1
nodelist.c
dlls/msxml3/nodelist.c
+17
-12
domdoc.c
dlls/msxml3/tests/domdoc.c
+13
-9
No files found.
dlls/msxml3/node.c
View file @
3d0c6627
...
...
@@ -319,7 +319,22 @@ static HRESULT WINAPI xmlnode_get_childNodes(
if
(
!
childList
)
return
E_INVALIDARG
;
*
childList
=
create_nodelist
(
This
->
node
->
children
);
switch
(
This
->
node
->
type
)
{
case
XML_ELEMENT_NODE
:
*
childList
=
create_filtered_nodelist
(
This
->
node
->
children
,
(
const
xmlChar
*
)
"*"
);
break
;
case
XML_ATTRIBUTE_NODE
:
*
childList
=
create_filtered_nodelist
(
This
->
node
->
children
,
(
const
xmlChar
*
)
"node()"
);
break
;
default:
FIXME
(
"unhandled node type %d
\n
"
,
This
->
node
->
type
);
break
;
}
if
(
!*
childList
)
return
S_FALSE
;
return
S_OK
;
...
...
dlls/msxml3/nodelist.c
View file @
3d0c6627
...
...
@@ -254,6 +254,7 @@ static HRESULT WINAPI xmlnodelist_get_item(
xmlnodelist
*
This
=
impl_from_IXMLDOMNodeList
(
iface
);
xmlNodePtr
curr
;
long
nodeIndex
=
0
;
HRESULT
r
;
TRACE
(
"%p %ld
\n
"
,
This
,
index
);
...
...
@@ -263,14 +264,16 @@ static HRESULT WINAPI xmlnodelist_get_item(
return
S_FALSE
;
curr
=
This
->
node
;
for
(
nodeIndex
=
0
;
nodeIndex
<
index
;
nodeIndex
++
)
{
if
(
curr
->
next
==
NULL
)
return
S_FALSE
;
else
curr
=
curr
->
next
;
while
(
curr
)
{
r
=
xslt_next_match
(
&
This
->
xinfo
,
&
curr
);
if
(
FAILED
(
r
)
||
!
curr
)
return
S_FALSE
;
if
(
nodeIndex
++
==
index
)
break
;
curr
=
curr
->
next
;
}
if
(
!
curr
)
return
S_FALSE
;
*
listItem
=
create_node
(
curr
);
return
S_OK
;
...
...
@@ -283,6 +286,7 @@ static HRESULT WINAPI xmlnodelist_get_length(
xmlNodePtr
curr
;
long
nodeCount
=
0
;
HRESULT
r
;
xmlnodelist
*
This
=
impl_from_IXMLDOMNodeList
(
iface
);
...
...
@@ -293,13 +297,14 @@ static HRESULT WINAPI xmlnodelist_get_length(
return
S_OK
;
}
curr
=
This
->
node
;
nodeCount
=
1
;
while
(
curr
->
next
!=
NULL
)
{
for
(
curr
=
This
->
node
;
curr
;
curr
=
curr
->
next
)
{
r
=
xslt_next_match
(
&
This
->
xinfo
,
&
curr
);
if
(
FAILED
(
r
)
||
!
curr
)
break
;
nodeCount
++
;
curr
=
curr
->
next
;
}
*
listLength
=
nodeCount
;
*
listLength
=
nodeCount
;
return
S_OK
;
}
...
...
dlls/msxml3/tests/domdoc.c
View file @
3d0c6627
...
...
@@ -50,15 +50,15 @@ static const WCHAR szComplete3[] = {
'<'
,
'a'
,
'>'
,
'<'
,
'/'
,
'a'
,
'>'
,
'\n'
,
0
};
static
const
WCHAR
szComplete4
[]
=
{
'<'
,
'?'
,
'x'
,
'm'
,
'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
'='
,
'\''
,
'1'
,
'2'
,
'3'
,
'4
'
,
'\''
,
'>'
,
'f'
,
'n'
,
'1'
,
'.'
,
't'
,
'x'
,
't'
,
'\n
'
,
'<'
,
'/'
,
'b'
,
's'
,
'>'
,
'\n
'
,
'<'
,
'p'
,
'r'
,
' '
,
'i'
,
'd'
,
'='
,
'\''
,
's'
,
't'
,
'r'
,
'3'
,
'\''
,
' '
,
'v'
,
'r'
,
'='
,
'\''
,
'1'
,
'.'
,
'2'
,
'.
'
,
'3'
,
'\''
,
' '
,
'p'
,
'n'
,
'='
,
'\''
,
'w'
,
'i'
,
'n'
,
'e'
,
' '
,
'2'
,
'0'
,
'0'
,
'5'
,
'0'
,
'8'
,
'0'
,
'4'
,
'\''
,
'>'
,
'\n
'
,
'f'
,
'n'
,
'2'
,
'.'
,
't'
,
'x'
,
't'
,
'\n
'
,
'<'
,
'/'
,
'p'
,
'r'
,
'>'
,
'\n
'
,
'<'
,
'/'
,
'l'
,
'c'
,
'>'
,
'\n'
,
0
};
static
const
WCHAR
szNonExistentFile
[]
=
{
...
...
@@ -439,6 +439,10 @@ void test_domnode( void )
if
(
list
)
{
r
=
IXMLDOMNodeList_get_length
(
list
,
&
count
);
ok
(
r
==
S_OK
,
"get_length returns %08lx
\n
"
,
r
);
ok
(
count
==
2
,
"get_length got %ld
\n
"
,
count
);
r
=
IXMLDOMNodeList_nextNode
(
list
,
&
node
);
ok
(
r
==
S_OK
,
"nextNode returned wrong code
\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