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
e0ff2f93
Commit
e0ff2f93
authored
Feb 23, 2016
by
Hans Leidekker
Committed by
Alexandre Julliard
Feb 23, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webservices: Add support for namespace attributes in the reader.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
bc131a26
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
2 deletions
+24
-2
reader.c
dlls/webservices/reader.c
+24
-2
No files found.
dlls/webservices/reader.c
View file @
e0ff2f93
...
...
@@ -862,10 +862,12 @@ static HRESULT parse_name( const unsigned char *str, unsigned int len,
static
HRESULT
read_attribute
(
struct
reader
*
reader
,
WS_XML_ATTRIBUTE
**
ret
)
{
static
const
WS_XML_STRING
xmlns
=
{
5
,
(
BYTE
*
)
"xmlns"
};
WS_XML_ATTRIBUTE
*
attr
;
WS_XML_UTF8_TEXT
*
text
;
unsigned
int
len
=
0
,
ch
,
skip
,
quote
;
const
unsigned
char
*
start
;
WS_XML_STRING
*
prefix
,
*
localname
;
HRESULT
hr
=
WS_E_INVALID_FORMAT
;
if
(
!
(
attr
=
heap_alloc_zero
(
sizeof
(
*
attr
)
)))
return
E_OUTOFMEMORY
;
...
...
@@ -880,9 +882,19 @@ static HRESULT read_attribute( struct reader *reader, WS_XML_ATTRIBUTE **ret )
}
if
(
!
len
)
goto
error
;
if
((
hr
=
parse_name
(
start
,
len
,
&
attr
->
prefix
,
&
attr
->
localN
ame
))
!=
S_OK
)
goto
error
;
if
((
hr
=
parse_name
(
start
,
len
,
&
prefix
,
&
localn
ame
))
!=
S_OK
)
goto
error
;
hr
=
E_OUTOFMEMORY
;
if
(
!
(
attr
->
ns
=
alloc_xml_string
(
NULL
,
0
)))
goto
error
;
if
(
WsXmlStringEquals
(
prefix
,
&
xmlns
,
NULL
)
==
S_OK
)
{
attr
->
isXmlNs
=
1
;
if
(
!
(
attr
->
prefix
=
alloc_xml_string
(
localname
->
bytes
,
localname
->
length
)))
goto
error
;
attr
->
localName
=
localname
;
}
else
{
attr
->
prefix
=
prefix
;
attr
->
localName
=
localname
;
}
hr
=
WS_E_INVALID_FORMAT
;
read_skip_whitespace
(
reader
);
...
...
@@ -906,8 +918,18 @@ static HRESULT read_attribute( struct reader *reader, WS_XML_ATTRIBUTE **ret )
read_skip
(
reader
,
1
);
hr
=
E_OUTOFMEMORY
;
if
(
attr
->
isXmlNs
)
{
if
(
!
(
attr
->
ns
=
alloc_xml_string
(
start
,
len
)))
goto
error
;
if
(
!
(
text
=
alloc_utf8_text
(
NULL
,
0
)))
goto
error
;
attr
->
value
=
&
text
->
text
;
}
else
{
if
(
!
(
attr
->
ns
=
alloc_xml_string
(
NULL
,
0
)))
goto
error
;
if
(
!
(
text
=
alloc_utf8_text
(
start
,
len
)))
goto
error
;
attr
->
value
=
&
text
->
text
;
}
attr
->
singleQuote
=
(
quote
==
'\''
);
*
ret
=
attr
;
...
...
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