Peoplecode to Create BI publisher XML and XSD Data source file.

Peoplecode to Create BI publisher XML and XSD Data source file.

 

import PSXP_RPTDEFNMANAGER:*;
import PSXP_XMLGEN:*;
&rs = create PSXP_XMLGEN:RowSetDS();
&rsStg = CreateRowset(Record.STAG_REC);
&rsStg.Fill();
/*Create Schema*/
&mySchema = &rs.GetXSDSchema(&rsStg);
&f1 = GetFile("STAG_XSD.xsd", "W", %FilePath_Relative);
&f1.WriteLine(&mySchema);
&f1.Close();
/*Create Sample XML File*/
&myXMLFile = &rs.GetXMLData(&rsStg, "CU_Add_XSD.xsd");
&f2 = GetFile("STAG_XML.xml", "W", %FilePath_Relative);
&f2.WriteLine(&myXMLFile);
&f2.Close();

你可能感兴趣的:(BI,Publisher)