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
b00046cc
Commit
b00046cc
authored
Jun 21, 2010
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jun 21, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Support xml:lang attribute in IXMLElement::getAttribute().
parent
6f778a79
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
20 deletions
+40
-20
xmlelem.c
dlls/msxml3/xmlelem.c
+40
-20
No files found.
dlls/msxml3/xmlelem.c
View file @
b00046cc
...
...
@@ -238,46 +238,66 @@ static HRESULT WINAPI xmlelem_setAttribute(IXMLElement *iface, BSTR strPropertyN
return
(
attr
)
?
S_OK
:
S_FALSE
;
}
static
HRESULT
WINAPI
xmlelem_getAttribute
(
IXMLElement
*
iface
,
BSTR
strPropertyN
ame
,
VARIANT
*
PropertyV
alue
)
static
HRESULT
WINAPI
xmlelem_getAttribute
(
IXMLElement
*
iface
,
BSTR
n
ame
,
VARIANT
*
v
alue
)
{
static
const
WCHAR
xmllangW
[]
=
{
'x'
,
'm'
,
'l'
,
':'
,
'l'
,
'a'
,
'n'
,
'g'
,
0
};
xmlelem
*
This
=
impl_from_IXMLElement
(
iface
);
xmlChar
*
val
=
NULL
,
*
name
;
xmlAttrPtr
ptr
;
xmlChar
*
val
=
NULL
;
TRACE
(
"(%p, %s, %p)
\n
"
,
iface
,
debugstr_w
(
strPropertyName
),
PropertyV
alue
);
TRACE
(
"(%p, %s, %p)
\n
"
,
iface
,
debugstr_w
(
name
),
v
alue
);
if
(
!
PropertyV
alue
)
if
(
!
v
alue
)
return
E_INVALIDARG
;
VariantInit
(
PropertyV
alue
);
V_BSTR
(
PropertyV
alue
)
=
NULL
;
VariantInit
(
v
alue
);
V_BSTR
(
v
alue
)
=
NULL
;
if
(
!
strPropertyN
ame
)
if
(
!
n
ame
)
return
E_INVALIDARG
;
name
=
xmlChar_from_wchar
(
strPropertyName
);
ptr
=
This
->
node
->
properties
;
while
(
ptr
)
/* case for xml:lang attribute */
if
(
!
lstrcmpiW
(
name
,
xmllangW
))
{
xmlNsPtr
ns
;
ns
=
xmlSearchNs
(
This
->
node
->
doc
,
This
->
node
,
(
xmlChar
*
)
"xml"
);
val
=
xmlGetNsProp
(
This
->
node
,
(
xmlChar
*
)
"lang"
,
ns
->
href
);
xmlFree
(
ns
);
}
else
{
if
(
!
lstrcmpiA
((
LPSTR
)
name
,
(
LPCSTR
)
ptr
->
name
))
xmlAttrPtr
attr
;
xmlChar
*
xml_name
;
xml_name
=
xmlChar_from_wchar
(
name
);
attr
=
This
->
node
->
properties
;
while
(
attr
)
{
val
=
xmlNodeListGetString
(
ptr
->
doc
,
ptr
->
children
,
1
);
break
;
BSTR
attr_name
;
attr_name
=
bstr_from_xmlChar
(
attr
->
name
);
if
(
!
lstrcmpiW
(
name
,
attr_name
))
{
val
=
xmlNodeListGetString
(
attr
->
doc
,
attr
->
children
,
1
);
SysFreeString
(
attr_name
);
break
;
}
attr
=
attr
->
next
;
SysFreeString
(
attr_name
);
}
ptr
=
ptr
->
next
;
heap_free
(
xml_name
)
;
}
if
(
val
)
{
V_VT
(
PropertyV
alue
)
=
VT_BSTR
;
V_BSTR
(
PropertyV
alue
)
=
bstr_from_xmlChar
(
val
);
V_VT
(
v
alue
)
=
VT_BSTR
;
V_BSTR
(
v
alue
)
=
bstr_from_xmlChar
(
val
);
}
heap_free
(
name
);
xmlFree
(
val
);
TRACE
(
"returning %s
\n
"
,
debugstr_w
(
V_BSTR
(
PropertyV
alue
)));
TRACE
(
"returning %s
\n
"
,
debugstr_w
(
V_BSTR
(
v
alue
)));
return
(
val
)
?
S_OK
:
S_FALSE
;
}
...
...
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