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
40c72e47
Commit
40c72e47
authored
Jun 18, 2013
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jul 24, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xmllite: Clear attributes on node change, improve tracing.
parent
b7702177
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
67 additions
and
3 deletions
+67
-3
reader.c
dlls/xmllite/reader.c
+67
-3
No files found.
dlls/xmllite/reader.c
View file @
40c72e47
...
...
@@ -20,6 +20,7 @@
#define COBJMACROS
#include <stdio.h>
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
...
...
@@ -98,6 +99,62 @@ static const WCHAR gtW[] = {'>',0};
static
const
WCHAR
commentW
[]
=
{
'<'
,
'!'
,
'-'
,
'-'
,
0
};
static
const
WCHAR
piW
[]
=
{
'<'
,
'?'
,
0
};
static
const
char
*
debugstr_nodetype
(
XmlNodeType
nodetype
)
{
static
const
char
*
type_names
[]
=
{
"None"
,
"Element"
,
"Attribute"
,
"Text"
,
"CDATA"
,
""
,
""
,
"ProcessingInstruction"
,
"Comment"
,
""
,
"DocumentType"
,
""
,
""
,
"Whitespace"
,
""
,
"EndElement"
,
""
,
"XmlDeclaration"
};
if
(
nodetype
>
_XmlNodeType_Last
)
{
static
char
buf
[
25
];
sprintf
(
buf
,
"unknown type=%d"
,
nodetype
);
return
buf
;
}
return
type_names
[
nodetype
];
}
static
const
char
*
debugstr_prop
(
XmlReaderProperty
prop
)
{
static
const
char
*
prop_names
[]
=
{
"MultiLanguage"
,
"ConformanceLevel"
,
"RandomAccess"
,
"XmlResolver"
,
"DtdProcessing"
,
"ReadState"
,
"MaxElementDepth"
,
"MaxEntityExpansion"
};
if
(
prop
>
_XmlReaderProperty_Last
)
{
static
char
buf
[
25
];
sprintf
(
buf
,
"unknown property=%d"
,
prop
);
return
buf
;
}
return
prop_names
[
prop
];
}
struct
xml_encoding_data
{
const
WCHAR
*
name
;
...
...
@@ -1983,6 +2040,9 @@ static HRESULT reader_parse_nextnode(xmlreader *reader)
{
HRESULT
hr
;
if
(
!
is_reader_pending
(
reader
))
reader_clear_attrs
(
reader
);
while
(
1
)
{
switch
(
reader
->
instate
)
...
...
@@ -2184,7 +2244,7 @@ static HRESULT WINAPI xmlreader_GetProperty(IXmlReader* iface, UINT property, LO
{
xmlreader
*
This
=
impl_from_IXmlReader
(
iface
);
TRACE
(
"(%p
%u %p)
\n
"
,
This
,
property
,
value
);
TRACE
(
"(%p
)->(%s %p)
\n
"
,
This
,
debugstr_prop
(
property
)
,
value
);
if
(
!
value
)
return
E_INVALIDARG
;
...
...
@@ -2208,7 +2268,7 @@ static HRESULT WINAPI xmlreader_SetProperty(IXmlReader* iface, UINT property, LO
{
xmlreader
*
This
=
impl_from_IXmlReader
(
iface
);
TRACE
(
"(%p
%u %lu)
\n
"
,
iface
,
property
,
value
);
TRACE
(
"(%p
)->(%s %lu)
\n
"
,
This
,
debugstr_prop
(
property
)
,
value
);
switch
(
property
)
{
...
...
@@ -2237,7 +2297,11 @@ static HRESULT WINAPI xmlreader_Read(IXmlReader* iface, XmlNodeType *nodetype)
hr
=
reader_parse_nextnode
(
This
);
if
(
oldtype
==
XmlNodeType_None
&&
This
->
nodetype
!=
oldtype
)
This
->
state
=
XmlReadState_Interactive
;
if
(
hr
==
S_OK
)
*
nodetype
=
This
->
nodetype
;
if
(
hr
==
S_OK
)
{
TRACE
(
"node type %s
\n
"
,
debugstr_nodetype
(
This
->
nodetype
));
*
nodetype
=
This
->
nodetype
;
}
return
hr
;
}
...
...
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