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
c085b8d9
Commit
c085b8d9
authored
Dec 19, 2012
by
Nikolay Sivov
Committed by
Alexandre Julliard
Dec 19, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xmllite: Support comment nodes.
parent
61483a58
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
8 deletions
+32
-8
reader.c
dlls/xmllite/reader.c
+30
-3
reader.c
dlls/xmllite/tests/reader.c
+2
-5
No files found.
dlls/xmllite/reader.c
View file @
c085b8d9
...
...
@@ -777,8 +777,35 @@ static HRESULT reader_parse_xmldecl(xmlreader *reader)
/* [15] Comment ::= '<!--' ((Char - '-') | ('-' (Char - '-')))* '-->' */
static
HRESULT
reader_parse_comment
(
xmlreader
*
reader
)
{
FIXME
(
"comments not supported
\n
"
);
return
E_NOTIMPL
;
const
WCHAR
*
start
,
*
ptr
;
/* skip '<!--' */
reader_skipn
(
reader
,
4
);
ptr
=
start
=
reader_get_cur
(
reader
);
while
(
*
ptr
)
{
if
(
ptr
[
0
]
==
'-'
&&
ptr
[
1
]
==
'-'
)
{
if
(
ptr
[
2
]
==
'>'
)
{
TRACE
(
"%s
\n
"
,
debugstr_wn
(
start
,
ptr
-
start
));
/* skip '-->' */
reader_skipn
(
reader
,
3
);
reader
->
nodetype
=
XmlNodeType_Comment
;
return
S_OK
;
}
else
return
WC_E_COMMENT
;
}
else
{
reader_skipn
(
reader
,
1
);
ptr
=
reader_get_cur
(
reader
);
}
}
return
MX_E_INPUTEND
;
}
/* [16] PI ::= '<?' PITarget (S (Char* - (Char* '?>' Char*)))? '?>' */
...
...
@@ -1014,7 +1041,7 @@ static HRESULT WINAPI xmlreader_Read(IXmlReader* iface, XmlNodeType *nodetype)
XmlNodeType
oldtype
=
This
->
nodetype
;
HRESULT
hr
;
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
nodetype
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
nodetype
);
if
(
This
->
state
==
XmlReadState_Closed
)
return
S_FALSE
;
...
...
dlls/xmllite/tests/reader.c
View file @
c085b8d9
...
...
@@ -721,10 +721,9 @@ static void test_read_comment(void)
type
=
XmlNodeType_None
;
hr
=
IXmlReader_Read
(
reader
,
&
type
);
todo_wine
{
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
type
==
XmlNodeType_Comment
,
"got %d
\n
"
,
type
);
}
IStream_Release
(
stream
);
stream
=
create_stream_on_data
(
xml_comment1
,
sizeof
(
xml_comment1
));
...
...
@@ -733,10 +732,9 @@ todo_wine {
type
=
XmlNodeType_None
;
hr
=
IXmlReader_Read
(
reader
,
&
type
);
todo_wine
{
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
type
==
XmlNodeType_Comment
,
"got %d
\n
"
,
type
);
}
IStream_Release
(
stream
);
stream
=
create_stream_on_data
(
xml_comment2
,
sizeof
(
xml_comment2
));
...
...
@@ -745,7 +743,6 @@ todo_wine {
type
=
XmlNodeType_None
;
hr
=
IXmlReader_Read
(
reader
,
&
type
);
todo_wine
ok
(
hr
==
WC_E_COMMENT
||
broken
(
hr
==
WC_E_GREATERTHAN
),
"got %08x
\n
"
,
hr
);
ok
(
type
==
XmlNodeType_None
,
"got %d
\n
"
,
type
);
IStream_Release
(
stream
);
...
...
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