void__fastcall Tfrmgencode::xsltxml1click (TObject *Sender) { //XSLT transformation XML file format_di_ixmldocument XML; _di_ixmldocument XSL; //xml::xmlintf::ixmldocument_di_ixmldocument Outdoc; //xml::xmlintf::ixmldocument *outdoc = Newxmldocument ();String F1, F2, F3; Widestring Rtext; UnicodeString USTR; F1="E:\\cjj\\callfunlog\\tableclass.xml"; F2="e:\\cjj\\callfunlog\\tableclass.xsl"; F3="c:\\kcode.html"; XML= Interface_cast<xmlintf::ixmldocument> (Newtxmldocument (NULL)); XSL= Interface_cast<xmlintf::ixmldocument> (Newtxmldocument (NULL)); Outdoc= Interface_cast<xmlintf::ixmldocument> (Newtxmldocument (NULL)); XML->loadfromfile (F1);//LoadXMLData (F1);Xsl->LoadFromFile (F2); XML->node->transformnode (xsl->documentelement, Rtext); //Err Documentelement->transformnode//Xml->documentelement->transformnode (xsl->documentelement, rtext);USTR =Rtext; SynMemo1->text =USTR; Outdoc-LoadFromXML (USTR); Outdoc-SaveToFile (F3); WebBrowser1-Navigate (F3); Deletefilew (F3);}
Write the XML data and XSL format OK!
C++builder XML XSL code generation