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
90cf2f1a
Commit
90cf2f1a
authored
Jan 16, 2010
by
Mike Kaplinskiy
Committed by
Alexandre Julliard
Jan 18, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml: getElementsByTagName does not respect namespaces.
We can't just use //tagname; we have to do //*[local-name()='tagname'].
parent
152c0d4b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
7 deletions
+29
-7
domdoc.c
dlls/msxml3/domdoc.c
+14
-3
element.c
dlls/msxml3/element.c
+15
-4
No files found.
dlls/msxml3/domdoc.c
View file @
90cf2f1a
...
...
@@ -1279,14 +1279,25 @@ static HRESULT WINAPI domdoc_getElementsByTagName(
BSTR
tagName
,
IXMLDOMNodeList
**
resultList
)
{
static
const
WCHAR
xpathformat
[]
=
{
'/'
,
'/'
,
'*'
,
'['
,
'l'
,
'o'
,
'c'
,
'a'
,
'l'
,
'-'
,
'n'
,
'a'
,
'm'
,
'e'
,
'('
,
')'
,
'='
,
'\''
,
'%'
,
's'
,
'\''
,
']'
,
0
};
domdoc
*
This
=
impl_from_IXMLDOMDocument2
(
iface
);
LPWSTR
szPattern
;
HRESULT
hr
;
TRACE
(
"(%p)->(%s, %p)
\n
"
,
This
,
debugstr_w
(
tagName
),
resultList
);
szPattern
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
WCHAR
)
*
(
2
+
lstrlenW
(
tagName
)
+
1
));
szPattern
[
0
]
=
szPattern
[
1
]
=
'/'
;
lstrcpyW
(
szPattern
+
2
,
tagName
);
if
(
tagName
[
0
]
==
'*'
&&
tagName
[
1
]
==
0
)
{
szPattern
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
WCHAR
)
*
4
);
szPattern
[
0
]
=
szPattern
[
1
]
=
'/'
;
szPattern
[
2
]
=
'*'
;
szPattern
[
3
]
=
0
;
}
else
{
szPattern
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
WCHAR
)
*
(
20
+
lstrlenW
(
tagName
)
+
1
));
wsprintfW
(
szPattern
,
xpathformat
,
tagName
);
}
hr
=
queryresult_create
((
xmlNodePtr
)
get_doc
(
This
),
szPattern
,
resultList
);
HeapFree
(
GetProcessHeap
(),
0
,
szPattern
);
...
...
dlls/msxml3/element.c
View file @
90cf2f1a
...
...
@@ -666,6 +666,8 @@ static HRESULT WINAPI domelem_getElementsByTagName(
IXMLDOMElement
*
iface
,
BSTR
bstrName
,
IXMLDOMNodeList
**
resultList
)
{
static
const
WCHAR
xpathformat
[]
=
{
'.'
,
'/'
,
'/'
,
'*'
,
'['
,
'l'
,
'o'
,
'c'
,
'a'
,
'l'
,
'-'
,
'n'
,
'a'
,
'm'
,
'e'
,
'('
,
')'
,
'='
,
'\''
,
'%'
,
's'
,
'\''
,
']'
,
0
};
domelem
*
This
=
impl_from_IXMLDOMElement
(
iface
);
LPWSTR
szPattern
;
xmlNodePtr
element
;
...
...
@@ -673,10 +675,19 @@ static HRESULT WINAPI domelem_getElementsByTagName(
TRACE
(
"(%p)->(%s,%p)
\n
"
,
This
,
debugstr_w
(
bstrName
),
resultList
);
szPattern
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
WCHAR
)
*
(
3
+
lstrlenW
(
bstrName
)
+
1
));
szPattern
[
0
]
=
'.'
;
szPattern
[
1
]
=
szPattern
[
2
]
=
'/'
;
lstrcpyW
(
szPattern
+
3
,
bstrName
);
if
(
bstrName
[
0
]
==
'*'
&&
bstrName
[
1
]
==
0
)
{
szPattern
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
WCHAR
)
*
5
);
szPattern
[
0
]
=
'.'
;
szPattern
[
1
]
=
szPattern
[
2
]
=
'/'
;
szPattern
[
3
]
=
'*'
;
szPattern
[
4
]
=
0
;
}
else
{
szPattern
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
WCHAR
)
*
(
21
+
lstrlenW
(
bstrName
)
+
1
));
wsprintfW
(
szPattern
,
xpathformat
,
bstrName
);
}
TRACE
(
"%s
\n
"
,
debugstr_w
(
szPattern
));
element
=
get_element
(
This
);
...
...
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