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
ed748a30
Commit
ed748a30
authored
Aug 11, 2005
by
Mike McCormack
Committed by
Alexandre Julliard
Aug 11, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement IXMLDOMDocument::loadXML.
parent
7af0f0a1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
3 deletions
+51
-3
domdoc.c
dlls/msxml3/domdoc.c
+51
-3
No files found.
dlls/msxml3/domdoc.c
View file @
ed748a30
...
...
@@ -668,7 +668,8 @@ static xmlDocPtr doread( LPWSTR filename )
ptr
=
MapViewOfFile
(
mapping
,
FILE_MAP_READ
,
0
,
0
,
len
);
if
(
ptr
)
{
xmldoc
=
xmlParseMemory
(
ptr
,
len
);
xmldoc
=
xmlReadMemory
(
ptr
,
len
,
NULL
,
NULL
,
XML_PARSE_NOERROR
|
XML_PARSE_NOWARNING
);
UnmapViewOfFile
(
ptr
);
}
CloseHandle
(
mapping
);
...
...
@@ -781,13 +782,60 @@ static HRESULT WINAPI domdoc_abort(
}
BOOL
bstr_to_utf8
(
BSTR
bstr
,
char
**
pstr
,
int
*
plen
)
{
UINT
len
,
blen
=
SysStringLen
(
bstr
);
LPSTR
str
;
len
=
WideCharToMultiByte
(
CP_UTF8
,
0
,
bstr
,
blen
,
NULL
,
0
,
NULL
,
NULL
);
str
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
if
(
!
str
)
return
FALSE
;
WideCharToMultiByte
(
CP_UTF8
,
0
,
bstr
,
blen
,
str
,
len
,
NULL
,
NULL
);
*
plen
=
len
;
*
pstr
=
str
;
return
TRUE
;
}
static
HRESULT
WINAPI
domdoc_loadXML
(
IXMLDOMDocument
*
iface
,
BSTR
bstrXML
,
VARIANT_BOOL
*
isSuccessful
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
domdoc
*
This
=
impl_from_IXMLDOMDocument
(
iface
);
xmlDocPtr
xmldoc
;
char
*
str
;
int
len
;
TRACE
(
"%p %s %p
\n
"
,
This
,
debugstr_w
(
bstrXML
),
isSuccessful
);
if
(
This
->
node
)
{
IXMLDOMNode_Release
(
This
->
node
);
This
->
node
=
NULL
;
}
if
(
!
isSuccessful
)
return
S_FALSE
;
*
isSuccessful
=
VARIANT_FALSE
;
if
(
!
bstrXML
)
return
S_FALSE
;
if
(
!
bstr_to_utf8
(
bstrXML
,
&
str
,
&
len
)
)
return
S_FALSE
;
xmldoc
=
xmlReadMemory
(
str
,
len
,
NULL
,
NULL
,
XML_PARSE_NOERROR
|
XML_PARSE_NOWARNING
);
HeapFree
(
GetProcessHeap
(),
0
,
str
);
This
->
node
=
create_domdoc_node
(
xmldoc
);
if
(
!
This
->
node
)
return
S_FALSE
;
*
isSuccessful
=
VARIANT_TRUE
;
return
S_OK
;
}
...
...
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