Parse XML using PHP

Stimulsoft Reports.PHP discussion
Post Reply
latika
Posts: 6
Joined: Wed Aug 03, 2011 9:10 am
Location: India

Parse XML using PHP

Post by latika »

Hello ,

I know this is trivial but sorry for my ignorance.
I have data in the form of XML.
How to show it inside a report for a php? I tried the following:

$xmlWrite ='';
$xmlWrite .='';
$xmlWrite .='';
$xmlWrite .='';
$xmlWrite .='


Demo
Demo
../reports/Demo.xml
../reports/Demo.xsd

';
$xmlWrite .='

Emplyee

EmplyeeID,System.String
EmplyeeName,System.String
EmployeeTitle,System.String
Phone,System.String


Emplyee
Demo.Emplyee





,Variable1,Variable1,,System.String,Report_x0020_Title,False,False,True


.
.
.
.
.
.
.
.
$xmlWrite .='';
while($row = mysql_fetch_array( $rs ) )
{
$xmlWrite .='';
for($i=0; $i". $row[$i]. "";
}
$xmlWrite .= '';
}
$xmlWrite .= '';
$timestamp = strtotime("now");
$_SESSION['filename'] = $timestamp;
$renameFile = $_SESSION['filename'];
//echo $xmlWrite;
$file = fopen("QuickStart/reports/SimpleList_$renameFile.mrt","x+");
fwrite($file,$xmlWrite);
fclose($file);

And it shows an empty report.

What is the mistake?
And the bigger question is: Where in the document can I find any information about this topic?

I am trying to parse the xml, but still is empty.
what is this
EmplyeeID,System.String
and
{Variable1}

I have wrote the same code like simpleList.mrt in a different page. and only link this page into my pop up window.



Run Report




but it's not working.
Please, help me.

Thanks
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Parse XML using PHP

Post by Vladimir »

Hello,

Please explain in more detail what you need?
The report and data are loaded separately, the path to the XML data file (relative or absolute) is stored in the MRT report file, it can be set in the designer.

Thank you.
Post Reply