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
b6377865
Commit
b6377865
authored
May 07, 2011
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 09, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Basic support for startElement()/endElement().
parent
34d86a2d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
16 deletions
+61
-16
mxwriter.c
dlls/msxml3/mxwriter.c
+28
-4
saxreader.c
dlls/msxml3/tests/saxreader.c
+33
-12
No files found.
dlls/msxml3/mxwriter.c
View file @
b6377865
...
...
@@ -541,9 +541,22 @@ static HRESULT WINAPI mxwriter_saxcontent_startElement(
ISAXAttributes
*
attr
)
{
mxwriter
*
This
=
impl_from_ISAXContentHandler
(
iface
);
FIXME
(
"(%p)->(%s %s %s %p)
\n
"
,
This
,
debugstr_wn
(
namespaceUri
,
nnamespaceUri
),
xmlChar
*
s
;
TRACE
(
"(%p)->(%s %s %s %p)
\n
"
,
This
,
debugstr_wn
(
namespaceUri
,
nnamespaceUri
),
debugstr_wn
(
local_name
,
nlocal_name
),
debugstr_wn
(
QName
,
nQName
),
attr
);
return
E_NOTIMPL
;
if
(
!
namespaceUri
||
!
local_name
||
!
QName
)
return
E_INVALIDARG
;
if
(
attr
)
FIXME
(
"attributes not handled
\n
"
);
xmlOutputBufferWriteString
(
This
->
buffer
,
"<"
);
s
=
xmlchar_from_wchar
(
QName
);
xmlOutputBufferWriteString
(
This
->
buffer
,
(
char
*
)
s
);
heap_free
(
s
);
xmlOutputBufferWriteString
(
This
->
buffer
,
">"
);
return
S_OK
;
}
static
HRESULT
WINAPI
mxwriter_saxcontent_endElement
(
...
...
@@ -556,9 +569,20 @@ static HRESULT WINAPI mxwriter_saxcontent_endElement(
int
nQName
)
{
mxwriter
*
This
=
impl_from_ISAXContentHandler
(
iface
);
FIXME
(
"(%p)->(%s %s %s)
\n
"
,
This
,
debugstr_wn
(
namespaceUri
,
nnamespaceUri
),
xmlChar
*
s
;
TRACE
(
"(%p)->(%s %s %s)
\n
"
,
This
,
debugstr_wn
(
namespaceUri
,
nnamespaceUri
),
debugstr_wn
(
local_name
,
nlocal_name
),
debugstr_wn
(
QName
,
nQName
));
return
E_NOTIMPL
;
if
(
!
namespaceUri
||
!
local_name
||
!
QName
)
return
E_INVALIDARG
;
xmlOutputBufferWriteString
(
This
->
buffer
,
"</"
);
s
=
xmlchar_from_wchar
(
QName
);
xmlOutputBufferWriteString
(
This
->
buffer
,
(
char
*
)
s
);
heap_free
(
s
);
xmlOutputBufferWriteString
(
This
->
buffer
,
">"
);
return
S_OK
;
}
static
HRESULT
WINAPI
mxwriter_saxcontent_characters
(
...
...
dlls/msxml3/tests/saxreader.c
View file @
b6377865
...
...
@@ -980,56 +980,66 @@ static void test_mxwriter_startendelement(void)
/* qualified name without defined namespace */
hr
=
ISAXContentHandler_startElement
(
content
,
NULL
,
0
,
NULL
,
0
,
_bstr_
(
"a:b"
),
3
,
NULL
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
hr
=
ISAXContentHandler_startElement
(
content
,
NULL
,
0
,
_bstr_
(
"b"
),
1
,
_bstr_
(
"a:b"
),
3
,
NULL
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
/* only local name is an error too */
hr
=
ISAXContentHandler_startElement
(
content
,
NULL
,
0
,
_bstr_
(
"b"
),
1
,
NULL
,
0
,
NULL
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
/* only local name is an error too */
hr
=
ISAXContentHandler_startElement
(
content
,
_bstr_
(
""
),
0
,
_bstr_
(
"b"
),
1
,
NULL
,
0
,
NULL
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
/* all string pointers should be not null */
hr
=
ISAXContentHandler_startElement
(
content
,
_bstr_
(
""
),
0
,
_bstr_
(
"b"
),
1
,
_bstr_
(
""
),
0
,
NULL
);
todo_wine
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
V_VT
(
&
dest
)
=
VT_EMPTY
;
hr
=
IMXWriter_get_output
(
writer
,
&
dest
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
V_VT
(
&
dest
)
==
VT_BSTR
,
"got %d
\n
"
,
V_VT
(
&
dest
));
todo_wine
ok
(
!
lstrcmpW
(
_bstr_
(
"<>"
),
V_BSTR
(
&
dest
)),
"got wrong content %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
dest
)));
ok
(
!
lstrcmpW
(
_bstr_
(
"<>"
),
V_BSTR
(
&
dest
)),
"got wrong content %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
dest
)));
VariantClear
(
&
dest
);
hr
=
ISAXContentHandler_startElement
(
content
,
_bstr_
(
""
),
0
,
_bstr_
(
""
),
0
,
_bstr_
(
"b"
),
1
,
NULL
);
todo_wine
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
V_VT
(
&
dest
)
=
VT_EMPTY
;
hr
=
IMXWriter_get_output
(
writer
,
&
dest
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
V_VT
(
&
dest
)
==
VT_BSTR
,
"got %d
\n
"
,
V_VT
(
&
dest
));
todo_wine
ok
(
!
lstrcmpW
(
_bstr_
(
"<><b>"
),
V_BSTR
(
&
dest
)),
"got wrong content %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
dest
)));
ok
(
!
lstrcmpW
(
_bstr_
(
"<><b>"
),
V_BSTR
(
&
dest
)),
"got wrong content %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
dest
)));
VariantClear
(
&
dest
);
hr
=
ISAXContentHandler_endElement
(
content
,
NULL
,
0
,
NULL
,
0
,
_bstr_
(
"a:b"
),
3
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
hr
=
ISAXContentHandler_endElement
(
content
,
NULL
,
0
,
_bstr_
(
"b"
),
1
,
_bstr_
(
"a:b"
),
3
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
/* only local name is an error too */
hr
=
ISAXContentHandler_endElement
(
content
,
NULL
,
0
,
_bstr_
(
"b"
),
1
,
NULL
,
0
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
hr
=
ISAXContentHandler_endElement
(
content
,
_bstr_
(
""
),
0
,
_bstr_
(
""
),
0
,
_bstr_
(
"b"
),
1
);
todo_wine
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
V_VT
(
&
dest
)
=
VT_EMPTY
;
hr
=
IMXWriter_get_output
(
writer
,
&
dest
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
V_VT
(
&
dest
)
==
VT_BSTR
,
"got %d
\n
"
,
V_VT
(
&
dest
));
todo_wine
ok
(
!
lstrcmpW
(
_bstr_
(
"<><b></b>"
),
V_BSTR
(
&
dest
)),
"got wrong content %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
dest
)));
ok
(
!
lstrcmpW
(
_bstr_
(
"<><b></b>"
),
V_BSTR
(
&
dest
)),
"got wrong content %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
dest
)));
VariantClear
(
&
dest
);
/* some with namespace URI */
hr
=
ISAXContentHandler_startElement
(
content
,
_bstr_
(
winehqA
),
sizeof
(
winehqA
),
_bstr_
(
""
),
0
,
_bstr_
(
"nspace:c"
),
8
,
NULL
);
todo_wine
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
ISAXContentHandler_endElement
(
content
,
_bstr_
(
winehqA
),
sizeof
(
winehqA
),
_bstr_
(
""
),
0
,
_bstr_
(
"nspace:c"
),
8
);
todo_wine
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
V_VT
(
&
dest
)
=
VT_EMPTY
;
hr
=
IMXWriter_get_output
(
writer
,
&
dest
);
...
...
@@ -1038,6 +1048,17 @@ static void test_mxwriter_startendelement(void)
todo_wine
ok
(
!
lstrcmpW
(
_bstr_
(
"<><b></b><nspace:c/>"
),
V_BSTR
(
&
dest
)),
"got wrong content %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
dest
)));
VariantClear
(
&
dest
);
/* try to end element that wasn't open */
hr
=
ISAXContentHandler_endElement
(
content
,
_bstr_
(
""
),
0
,
_bstr_
(
""
),
0
,
_bstr_
(
"a"
),
1
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
V_VT
(
&
dest
)
=
VT_EMPTY
;
hr
=
IMXWriter_get_output
(
writer
,
&
dest
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
V_VT
(
&
dest
)
==
VT_BSTR
,
"got %d
\n
"
,
V_VT
(
&
dest
));
todo_wine
ok
(
!
lstrcmpW
(
_bstr_
(
"<><b></b><nspace:c/></a>"
),
V_BSTR
(
&
dest
)),
"got wrong content %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
dest
)));
VariantClear
(
&
dest
);
hr
=
ISAXContentHandler_endDocument
(
content
);
todo_wine
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
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