Games etc

Thursday, December 16, 2004

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
\n\n
\n
\t

\n
\t\n
\t\n
\t\n
\t\n\t; \n\t
\n\t

\n\n

0 Comments:

Post a Comment

<< Home