static LPCWSTR s_szFormatConfig = L""\
L" edit window is not XML friendly, see original post for details";
static HRESULT FormatConfig(IXMLDOMDocument * pInDoc, CComPtr
{
HRESULT hr = S_OK;
CComPtr
VARIANT_BOOL vbSuccess;
IFC(CoCreateInstance(__uuidof(DOMDocument60),
NULL,
CLSCTX_INPROC_SERVER,
__uuidof(IXMLDOMDocument),
(void**)&spSS));
IFC(CoCreateInstance(__uuidof(DOMDocument60),
NULL,
CLSCTX_INPROC_SERVER,
__uuidof(IXMLDOMDocument),
(void**)&spOutDoc));
spSS->put_resolveExternals(VARIANT_FALSE);
spSS->put_preserveWhiteSpace(VARIANT_TRUE);
spOutDoc->put_resolveExternals(VARIANT_FALSE);
spOutDoc->put_preserveWhiteSpace(VARIANT_TRUE);
//
// load SS from string
//
IFC(spSS->loadXML(CComBSTR(s_szFormatConfig), &vbSuccess));
if(vbSuccess != VARIANT_TRUE)
{
hr = E_FAIL;
goto Cleanup;
}
//
// convert
//
IFC(pInDoc->transformNodeToObject(spSS, CComVariant(spOutDoc)));
Cleanup:
return hr;
}
Convert document to UTF8
static HRESULT ForceUTF8(IXMLDOMDocument * pDoc)
{
HRESULT hr = S_OK;
CComPtr
CComPtr
CComPtr
CComPtr
IFC(pDoc->createProcessingInstruction(L"xml", L"version=\"1.0\" encoding=\"UTF-8\"", &spPI));
IFC(pDoc->get_childNodes(&spChildren));
IFC(spChildren->get_item(0, &spOldPI));
IFC(pDoc->replaceChild( spPI, spOldPI, &spOutOldPI));
Cleanup:
return hr;
}
1 comment:
PINDOC?
Like in JKR - 66?
This is the GI- JOES of JO BIDEN with DICK CHENEY- SCHAR- LEARS?
This is your NEVADA WHAMBANGO?
And all the SKY ROCK with ACE?
DISCO 3 and MP MIG SEMPOU got a COWSCULA - URAMU and it's a huge THUMMU - SORAM and made
MANDES - BEDISMAN .
And y'all know what that means?
YONNOB 113....with KILLA WATT....and MASTESPANKER 69....being JOHN KERR.
Post a Comment