COM XML XSL Dynamic coding
Author: M.A. Nischalke
/***************************************************
// Create DOMDocument for the stylesheet and load
// the stylesheet string resource into it.
***************************************************/
BOOL CMainFrame::CreateStylesheet()
{
USES_CONVERSION;
// Create an DOMDocument for the stylesheet
if( FAILED(m_pXSLDoc.CoCreateInstance(__uuidof(DOMDocument2))) || !m_pXSLDoc )
return FALSE;
// To reduce the supoort files the XSL is stored as a resource
// and loaded into the previously created DOMDocument.
CString strXSL;
strXSL.LoadString(IDS_XSL);
short bSuccess;
if( FAILED(m_pXSLDoc->loadXML(A2OLE(strXSL), &bSuccess) ) )
return FALSE;
return TRUE;
}
XSL stored in resource
\n
\t\n
\t
\t
\t
\t
0 Comments:
Post a Comment
<< Home