Commit edf61623 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

msxml3: Remove no longer used get_xml() option to mess with encoding attribute.

parent fac36c55
...@@ -497,7 +497,7 @@ static HRESULT WINAPI domattr_get_xml( ...@@ -497,7 +497,7 @@ static HRESULT WINAPI domattr_get_xml(
TRACE("(%p)->(%p)\n", This, p); TRACE("(%p)->(%p)\n", This, p);
return node_get_xml(&This->node, FALSE, FALSE, p); return node_get_xml(&This->node, FALSE, p);
} }
static HRESULT WINAPI domattr_transformNode( static HRESULT WINAPI domattr_transformNode(
......
...@@ -452,7 +452,7 @@ static HRESULT WINAPI domcdata_get_xml( ...@@ -452,7 +452,7 @@ static HRESULT WINAPI domcdata_get_xml(
TRACE("(%p)->(%p)\n", This, p); TRACE("(%p)->(%p)\n", This, p);
return node_get_xml(&This->node, FALSE, FALSE, p); return node_get_xml(&This->node, FALSE, p);
} }
static HRESULT WINAPI domcdata_transformNode( static HRESULT WINAPI domcdata_transformNode(
......
...@@ -451,7 +451,7 @@ static HRESULT WINAPI domcomment_get_xml( ...@@ -451,7 +451,7 @@ static HRESULT WINAPI domcomment_get_xml(
TRACE("(%p)->(%p)\n", This, p); TRACE("(%p)->(%p)\n", This, p);
return node_get_xml(&This->node, FALSE, FALSE, p); return node_get_xml(&This->node, FALSE, p);
} }
static HRESULT WINAPI domcomment_transformNode( static HRESULT WINAPI domcomment_transformNode(
......
...@@ -449,7 +449,7 @@ static HRESULT WINAPI domfrag_get_xml( ...@@ -449,7 +449,7 @@ static HRESULT WINAPI domfrag_get_xml(
TRACE("(%p)->(%p)\n", This, p); TRACE("(%p)->(%p)\n", This, p);
return node_get_xml(&This->node, FALSE, FALSE, p); return node_get_xml(&This->node, FALSE, p);
} }
static HRESULT WINAPI domfrag_transformNode( static HRESULT WINAPI domfrag_transformNode(
......
...@@ -926,7 +926,7 @@ static HRESULT WINAPI domelem_get_xml( ...@@ -926,7 +926,7 @@ static HRESULT WINAPI domelem_get_xml(
TRACE("(%p)->(%p)\n", This, p); TRACE("(%p)->(%p)\n", This, p);
return node_get_xml(&This->node, TRUE, FALSE, p); return node_get_xml(&This->node, TRUE, p);
} }
static HRESULT WINAPI domelem_transformNode( static HRESULT WINAPI domelem_transformNode(
......
...@@ -444,7 +444,7 @@ static HRESULT WINAPI entityref_get_xml( ...@@ -444,7 +444,7 @@ static HRESULT WINAPI entityref_get_xml(
TRACE("(%p)->(%p)\n", This, p); TRACE("(%p)->(%p)\n", This, p);
return node_get_xml(&This->node, FALSE, FALSE, p); return node_get_xml(&This->node, FALSE, p);
} }
static HRESULT WINAPI entityref_transformNode( static HRESULT WINAPI entityref_transformNode(
......
...@@ -329,7 +329,7 @@ extern HRESULT node_get_next_sibling(xmlnode*,IXMLDOMNode**) DECLSPEC_HIDDEN; ...@@ -329,7 +329,7 @@ extern HRESULT node_get_next_sibling(xmlnode*,IXMLDOMNode**) DECLSPEC_HIDDEN;
extern HRESULT node_insert_before(xmlnode*,IXMLDOMNode*,const VARIANT*,IXMLDOMNode**) DECLSPEC_HIDDEN; extern HRESULT node_insert_before(xmlnode*,IXMLDOMNode*,const VARIANT*,IXMLDOMNode**) DECLSPEC_HIDDEN;
extern HRESULT node_replace_child(xmlnode*,IXMLDOMNode*,IXMLDOMNode*,IXMLDOMNode**) DECLSPEC_HIDDEN; extern HRESULT node_replace_child(xmlnode*,IXMLDOMNode*,IXMLDOMNode*,IXMLDOMNode**) DECLSPEC_HIDDEN;
extern HRESULT node_put_text(xmlnode*,BSTR) DECLSPEC_HIDDEN; extern HRESULT node_put_text(xmlnode*,BSTR) DECLSPEC_HIDDEN;
extern HRESULT node_get_xml(xmlnode*,BOOL,BOOL,BSTR*) DECLSPEC_HIDDEN; extern HRESULT node_get_xml(xmlnode*,BOOL,BSTR*) DECLSPEC_HIDDEN;
extern HRESULT node_clone(xmlnode*,VARIANT_BOOL,IXMLDOMNode**) DECLSPEC_HIDDEN; extern HRESULT node_clone(xmlnode*,VARIANT_BOOL,IXMLDOMNode**) DECLSPEC_HIDDEN;
extern HRESULT node_get_prefix(xmlnode*,BSTR*) DECLSPEC_HIDDEN; extern HRESULT node_get_prefix(xmlnode*,BSTR*) DECLSPEC_HIDDEN;
extern HRESULT node_get_base_name(xmlnode*,BSTR*) DECLSPEC_HIDDEN; extern HRESULT node_get_base_name(xmlnode*,BSTR*) DECLSPEC_HIDDEN;
......
...@@ -787,37 +787,6 @@ BSTR EnsureCorrectEOL(BSTR sInput) ...@@ -787,37 +787,6 @@ BSTR EnsureCorrectEOL(BSTR sInput)
return sNew; return sNew;
} }
/* Removes encoding information and last character (nullbyte) */
static BSTR EnsureNoEncoding(BSTR sInput)
{
static const WCHAR wszEncoding[] = {'e','n','c','o','d','i','n','g','='};
BSTR sNew;
WCHAR *pBeg, *pEnd;
pBeg = sInput;
while(*pBeg != '\n' && memcmp(pBeg, wszEncoding, sizeof(wszEncoding)))
pBeg++;
if(*pBeg == '\n')
{
SysReAllocStringLen(&sInput, sInput, SysStringLen(sInput)-1);
return sInput;
}
pBeg--;
pEnd = pBeg + sizeof(wszEncoding)/sizeof(WCHAR) + 2;
while(*pEnd != '\"') pEnd++;
pEnd++;
sNew = SysAllocStringLen(NULL,
pBeg-sInput + SysStringLen(sInput)-(pEnd-sInput)-1);
memcpy(sNew, sInput, (pBeg-sInput)*sizeof(WCHAR));
memcpy(&sNew[pBeg-sInput], pEnd, (SysStringLen(sInput)-(pEnd-sInput)-1)*sizeof(WCHAR));
SysFreeString(sInput);
return sNew;
}
/* /*
* We are trying to replicate the same behaviour as msxml by converting * We are trying to replicate the same behaviour as msxml by converting
* line endings to \r\n and using indents as \t. The problem is that msxml * line endings to \r\n and using indents as \t. The problem is that msxml
...@@ -825,7 +794,7 @@ static BSTR EnsureNoEncoding(BSTR sInput) ...@@ -825,7 +794,7 @@ static BSTR EnsureNoEncoding(BSTR sInput)
* reproduce behaviour exactly. * reproduce behaviour exactly.
* *
*/ */
HRESULT node_get_xml(xmlnode *This, BOOL ensure_eol, BOOL ensure_no_encoding, BSTR *ret) HRESULT node_get_xml(xmlnode *This, BOOL ensure_eol, BSTR *ret)
{ {
xmlBufferPtr xml_buf; xmlBufferPtr xml_buf;
xmlNodePtr xmldecl; xmlNodePtr xmldecl;
...@@ -853,8 +822,6 @@ HRESULT node_get_xml(xmlnode *This, BOOL ensure_eol, BOOL ensure_no_encoding, BS ...@@ -853,8 +822,6 @@ HRESULT node_get_xml(xmlnode *This, BOOL ensure_eol, BOOL ensure_no_encoding, BS
content = bstr_from_xmlChar(buf_content + (buf_content[0] == ' ' ? 1 : 0)); content = bstr_from_xmlChar(buf_content + (buf_content[0] == ' ' ? 1 : 0));
if(ensure_eol) if(ensure_eol)
content = EnsureCorrectEOL(content); content = EnsureCorrectEOL(content);
if(ensure_no_encoding)
content = EnsureNoEncoding(content);
*ret = content; *ret = content;
}else { }else {
...@@ -1453,7 +1420,7 @@ static HRESULT WINAPI unknode_get_xml( ...@@ -1453,7 +1420,7 @@ static HRESULT WINAPI unknode_get_xml(
FIXME("(%p)->(%p)\n", This, p); FIXME("(%p)->(%p)\n", This, p);
return node_get_xml(&This->node, FALSE, FALSE, p); return node_get_xml(&This->node, FALSE, p);
} }
static HRESULT WINAPI unknode_transformNode( static HRESULT WINAPI unknode_transformNode(
......
...@@ -487,7 +487,7 @@ static HRESULT WINAPI dom_pi_get_xml( ...@@ -487,7 +487,7 @@ static HRESULT WINAPI dom_pi_get_xml(
TRACE("(%p)->(%p)\n", This, p); TRACE("(%p)->(%p)\n", This, p);
return node_get_xml(&This->node, FALSE, FALSE, p); return node_get_xml(&This->node, FALSE, p);
} }
static HRESULT WINAPI dom_pi_transformNode( static HRESULT WINAPI dom_pi_transformNode(
......
...@@ -514,7 +514,7 @@ static HRESULT WINAPI domtext_get_xml( ...@@ -514,7 +514,7 @@ static HRESULT WINAPI domtext_get_xml(
TRACE("(%p)->(%p)\n", This, p); TRACE("(%p)->(%p)\n", This, p);
return node_get_xml(&This->node, FALSE, FALSE, p); return node_get_xml(&This->node, FALSE, p);
} }
static HRESULT WINAPI domtext_transformNode( static HRESULT WINAPI domtext_transformNode(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment