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
b9e9e041
Commit
b9e9e041
authored
Jan 14, 2008
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Jan 14, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Implemented IXMLDOMCDATASection COM Object.
parent
bf4a43e1
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
85 additions
and
2 deletions
+85
-2
Makefile.in
dlls/msxml3/Makefile.in
+1
-0
cdata.c
dlls/msxml3/cdata.c
+0
-0
domdoc.c
dlls/msxml3/domdoc.c
+23
-2
msxml_private.h
dlls/msxml3/msxml_private.h
+1
-0
domdoc.c
dlls/msxml3/tests/domdoc.c
+60
-0
No files found.
dlls/msxml3/Makefile.in
View file @
b9e9e041
...
...
@@ -10,6 +10,7 @@ EXTRAINCL = @XML2INCL@ @XSLTINCL@
C_SRCS
=
\
attribute.c
\
cdata.c
\
comment.c
\
domdoc.c
\
element.c
\
...
...
dlls/msxml3/cdata.c
0 → 100644
View file @
b9e9e041
This diff is collapsed.
Click to expand it.
dlls/msxml3/domdoc.c
View file @
b9e9e041
...
...
@@ -947,8 +947,29 @@ static HRESULT WINAPI domdoc_createCDATASection(
BSTR
data
,
IXMLDOMCDATASection
**
cdata
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
domdoc
*
This
=
impl_from_IXMLDOMDocument2
(
iface
);
xmlNodePtr
xmlnode
;
xmlChar
*
xml_content
;
TRACE
(
"%p->(%s %p)
\n
"
,
iface
,
debugstr_w
(
data
),
comment
);
if
(
!
cdata
)
return
E_INVALIDARG
;
*
cdata
=
NULL
;
xml_content
=
xmlChar_from_wchar
((
WCHAR
*
)
data
);
xmlnode
=
xmlNewCDataBlock
(
get_doc
(
This
),
xml_content
,
strlen
(
(
char
*
)
xml_content
)
);
HeapFree
(
GetProcessHeap
(),
0
,
xml_content
);
if
(
!
xmlnode
)
return
E_FAIL
;
xmlnode
->
doc
=
get_doc
(
This
);
*
cdata
=
(
IXMLDOMCDATASection
*
)
create_cdata
(
xmlnode
);
return
S_OK
;
}
...
...
dlls/msxml3/msxml_private.h
View file @
b9e9e041
...
...
@@ -41,6 +41,7 @@ extern IUnknown *create_attribute( xmlNodePtr attribute );
extern
IUnknown
*
create_text
(
xmlNodePtr
text
);
extern
IUnknown
*
create_pi
(
xmlNodePtr
pi
);
extern
IUnknown
*
create_comment
(
xmlNodePtr
comment
);
extern
IUnknown
*
create_cdata
(
xmlNodePtr
text
);
extern
IXMLDOMNodeList
*
create_children_nodelist
(
xmlNodePtr
);
extern
IXMLDOMNamedNodeMap
*
create_nodemap
(
IXMLDOMNode
*
node
);
...
...
dlls/msxml3/tests/domdoc.c
View file @
b9e9e041
...
...
@@ -146,6 +146,13 @@ static WCHAR szElementXML2[] = {'<','E','l','e','T','e','s','t',' ','A','t','t',
static
WCHAR
szAttribute
[]
=
{
'A'
,
't'
,
't'
,
'r'
,
0
};
static
WCHAR
szAttributeXML
[]
=
{
'A'
,
't'
,
't'
,
'r'
,
'='
,
'"'
,
'"'
,
0
};
static
WCHAR
szCData
[]
=
{
'['
,
'1'
,
']'
,
'*'
,
'2'
,
'='
,
'3'
,
';'
,
' '
,
'&'
,
'g'
,
'e'
,
'e'
,
' '
,
't'
,
'h'
,
'a'
,
't'
,
's'
,
' '
,
'n'
,
'o'
,
't'
,
' '
,
'r'
,
'i'
,
'g'
,
'h'
,
't'
,
'!'
,
0
};
static
WCHAR
szCDataXML
[]
=
{
'<'
,
'!'
,
'['
,
'C'
,
'D'
,
'A'
,
'T'
,
'A'
,
'['
,
'['
,
'1'
,
']'
,
'*'
,
'2'
,
'='
,
'3'
,
';'
,
' '
,
'&'
,
'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
};
#define expect_bstr_eq_and_free(bstr, expect) { \
BSTR bstrExp = alloc_str_from_narrow(expect); \
ok(lstrcmpW(bstr, bstrExp) == 0, "String differs\n"); \
...
...
@@ -1839,6 +1846,7 @@ static void test_xmlTypes(void)
IXMLDOMElement
*
pElement
;
IXMLDOMAttribute
*
pAttrubute
;
IXMLDOMNamedNodeMap
*
pAttribs
;
IXMLDOMCDATASection
*
pCDataSec
;
BSTR
str
;
IXMLDOMNode
*
pNextChild
=
(
IXMLDOMNode
*
)
0x1
;
/* Used for testing Siblings */
VARIANT
v
;
...
...
@@ -2018,6 +2026,58 @@ static void test_xmlTypes(void)
IXMLDOMElement_Release
(
pElement
);
}
/* CData Section */
hr
=
IXMLDOMDocument_createCDATASection
(
doc
,
szCData
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"ret %08x
\n
"
,
hr
);
hr
=
IXMLDOMDocument_createCDATASection
(
doc
,
szCData
,
&
pCDataSec
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
{
IXMLDOMNode
*
pNextChild
=
(
IXMLDOMNode
*
)
0x1
;
hr
=
IXMLDOMElement_appendChild
(
pRoot
,
(
IXMLDOMNode
*
)
pCDataSec
,
NULL
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
/* get Attribute Tests */
hr
=
IXMLDOMCDATASection_get_attributes
(
pCDataSec
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"ret %08x
\n
"
,
hr
);
pAttribs
=
(
IXMLDOMNamedNodeMap
*
)
0x1
;
hr
=
IXMLDOMCDATASection_get_attributes
(
pCDataSec
,
&
pAttribs
);
ok
(
hr
==
S_FALSE
,
"ret %08x
\n
"
,
hr
);
ok
(
pAttribs
==
NULL
,
"pAttribs != NULL
\n
"
);
hr
=
IXMLDOMCDATASection_get_nodeName
(
pCDataSec
,
&
str
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
str
,
szCDataNodeText
),
"incorrect cdata node Name
\n
"
);
SysFreeString
(
str
);
hr
=
IXMLDOMCDATASection_get_xml
(
pCDataSec
,
&
str
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
str
,
szCDataXML
),
"incorrect cdata xml
\n
"
);
SysFreeString
(
str
);
/* test lastChild */
pNextChild
=
(
IXMLDOMNode
*
)
0x1
;
hr
=
IXMLDOMCDATASection_get_lastChild
(
pCDataSec
,
&
pNextChild
);
ok
(
hr
==
S_FALSE
,
"ret %08x
\n
"
,
hr
);
ok
(
pNextChild
==
NULL
,
"pNextChild not NULL
\n
"
);
/* test get_dataType */
hr
=
IXMLDOMCDATASection_get_dataType
(
pCDataSec
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"ret %08x
\n
"
,
hr
);
hr
=
IXMLDOMCDATASection_get_dataType
(
pCDataSec
,
&
v
);
ok
(
hr
==
S_FALSE
,
"ret %08x
\n
"
,
hr
);
ok
(
V_VT
(
&
v
)
==
VT_NULL
,
"incorrect dataType type
\n
"
);
VariantClear
(
&
v
);
IXMLDOMCDATASection_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