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
c40d4997
Commit
c40d4997
authored
Jan 19, 2008
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Jan 21, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Implement IXMLDOMDocumentFragment Interface.
parent
90eb70bc
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
88 additions
and
2 deletions
+88
-2
Makefile.in
dlls/msxml3/Makefile.in
+1
-0
docfrag.c
dlls/msxml3/docfrag.c
+0
-0
domdoc.c
dlls/msxml3/domdoc.c
+20
-2
msxml_private.h
dlls/msxml3/msxml_private.h
+1
-0
domdoc.c
dlls/msxml3/tests/domdoc.c
+66
-0
No files found.
dlls/msxml3/Makefile.in
View file @
c40d4997
...
...
@@ -12,6 +12,7 @@ C_SRCS = \
attribute.c
\
cdata.c
\
comment.c
\
docfrag.c
\
domdoc.c
\
domimpl.c
\
element.c
\
...
...
dlls/msxml3/docfrag.c
0 → 100644
View file @
c40d4997
This diff is collapsed.
Click to expand it.
dlls/msxml3/domdoc.c
View file @
c40d4997
...
...
@@ -885,8 +885,26 @@ static HRESULT WINAPI domdoc_createDocumentFragment(
IXMLDOMDocument2
*
iface
,
IXMLDOMDocumentFragment
**
docFrag
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
domdoc
*
This
=
impl_from_IXMLDOMDocument2
(
iface
);
xmlNodePtr
xmlnode
;
TRACE
(
"%p
\n
"
,
iface
);
if
(
!
docFrag
)
return
E_INVALIDARG
;
*
docFrag
=
NULL
;
xmlnode
=
xmlNewDocFragment
(
get_doc
(
This
)
);
if
(
!
xmlnode
)
return
E_FAIL
;
xmlnode
->
doc
=
get_doc
(
This
);
*
docFrag
=
(
IXMLDOMDocumentFragment
*
)
create_doc_fragment
(
xmlnode
);
return
S_OK
;
}
...
...
dlls/msxml3/msxml_private.h
View file @
c40d4997
...
...
@@ -45,6 +45,7 @@ extern IUnknown *create_cdata( xmlNodePtr text );
extern
IXMLDOMNodeList
*
create_children_nodelist
(
xmlNodePtr
);
extern
IXMLDOMNamedNodeMap
*
create_nodemap
(
IXMLDOMNode
*
node
);
extern
IUnknown
*
create_doc_Implementation
();
extern
IUnknown
*
create_doc_fragment
(
xmlNodePtr
fragment
);
extern
HRESULT
queryresult_create
(
xmlNodePtr
,
LPWSTR
,
IXMLDOMNodeList
**
);
...
...
dlls/msxml3/tests/domdoc.c
View file @
c40d4997
...
...
@@ -154,6 +154,7 @@ static WCHAR szCDataXML[] = {'<','!','[','C','D','A','T','A','[','[','1',']','*'
'g'
,
'e'
,
'e'
,
' '
,
't'
,
'h'
,
'a'
,
't'
,
's'
,
' '
,
'n'
,
'o'
,
't'
,
' '
,
'r'
,
'i'
,
'g'
,
'h'
,
't'
,
'!'
,
']'
,
']'
,
'>'
,
0
};
static
WCHAR
szCDataNodeText
[]
=
{
'#'
,
'c'
,
'd'
,
'a'
,
't'
,
'a'
,
'-'
,
's'
,
'e'
,
'c'
,
't'
,
'i'
,
'o'
,
'n'
,
0
};
static
WCHAR
szDocFragmentText
[]
=
{
'#'
,
'd'
,
'o'
,
'c'
,
'u'
,
'm'
,
'e'
,
'n'
,
't'
,
'-'
,
'f'
,
'r'
,
'a'
,
'g'
,
'm'
,
'e'
,
'n'
,
't'
,
0
};
#define expect_bstr_eq_and_free(bstr, expect) { \
BSTR bstrExp = alloc_str_from_narrow(expect); \
...
...
@@ -1873,6 +1874,7 @@ static void test_xmlTypes(void)
IXMLDOMNamedNodeMap
*
pAttribs
;
IXMLDOMCDATASection
*
pCDataSec
;
IXMLDOMImplementation
*
pIXMLDOMImplementation
=
NULL
;
IXMLDOMDocumentFragment
*
pDocFrag
=
NULL
;
BSTR
str
;
IXMLDOMNode
*
pNextChild
=
(
IXMLDOMNode
*
)
0x1
;
/* Used for testing Siblings */
VARIANT
v
;
...
...
@@ -2194,6 +2196,70 @@ static void test_xmlTypes(void)
IXMLDOMCDATASection_Release
(
pCDataSec
);
}
/* Document Fragments */
hr
=
IXMLDOMDocument_createDocumentFragment
(
doc
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"ret %08x
\n
"
,
hr
);
hr
=
IXMLDOMDocument_createDocumentFragment
(
doc
,
&
pDocFrag
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
{
IXMLDOMNode
*
pNextChild
=
(
IXMLDOMNode
*
)
0x1
;
hr
=
IXMLDOMElement_appendChild
(
pRoot
,
(
IXMLDOMNode
*
)
pDocFrag
,
NULL
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
/* get Attribute Tests */
hr
=
IXMLDOMDocumentFragment_get_attributes
(
pDocFrag
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"ret %08x
\n
"
,
hr
);
pAttribs
=
(
IXMLDOMNamedNodeMap
*
)
0x1
;
hr
=
IXMLDOMDocumentFragment_get_attributes
(
pDocFrag
,
&
pAttribs
);
ok
(
hr
==
S_FALSE
,
"ret %08x
\n
"
,
hr
);
ok
(
pAttribs
==
NULL
,
"pAttribs != NULL
\n
"
);
hr
=
IXMLDOMDocumentFragment_get_nodeName
(
pDocFrag
,
&
str
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
str
,
szDocFragmentText
),
"incorrect docfragment node Name
\n
"
);
SysFreeString
(
str
);
/* test next Sibling*/
hr
=
IXMLDOMDocumentFragment_get_nextSibling
(
pDocFrag
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"ret %08x
\n
"
,
hr
);
pNextChild
=
(
IXMLDOMNode
*
)
0x1
;
hr
=
IXMLDOMDocumentFragment_get_nextSibling
(
pDocFrag
,
&
pNextChild
);
ok
(
hr
==
S_FALSE
,
"ret %08x
\n
"
,
hr
);
ok
(
pNextChild
==
NULL
,
"pNextChild not NULL
\n
"
);
/* test Previous Sibling*/
hr
=
IXMLDOMDocumentFragment_get_previousSibling
(
pDocFrag
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"ret %08x
\n
"
,
hr
);
pNextChild
=
(
IXMLDOMNode
*
)
0x1
;
hr
=
IXMLDOMDocumentFragment_get_previousSibling
(
pDocFrag
,
&
pNextChild
);
ok
(
hr
==
S_FALSE
,
"ret %08x
\n
"
,
hr
);
ok
(
pNextChild
==
NULL
,
"pNextChild not NULL
\n
"
);
/* test get_dataType */
hr
=
IXMLDOMDocumentFragment_get_dataType
(
pDocFrag
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"ret %08x
\n
"
,
hr
);
hr
=
IXMLDOMDocumentFragment_get_dataType
(
pDocFrag
,
&
v
);
ok
(
hr
==
S_FALSE
,
"ret %08x
\n
"
,
hr
);
ok
(
V_VT
(
&
v
)
==
VT_NULL
,
"incorrect dataType type
\n
"
);
VariantClear
(
&
v
);
/* test nodeTypeString */
hr
=
IXMLDOMDocumentFragment_get_nodeTypeString
(
pDocFrag
,
&
str
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
str
,
_bstr_
(
"documentfragment"
)
),
"incorrect nodeTypeString string
\n
"
);
SysFreeString
(
str
);
IXMLDOMDocumentFragment_Release
(
pCDataSec
);
}
IXMLDOMElement_Release
(
pRoot
);
...
...
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