ac Report post Posted September 6, 2007 Why can't I do this: .... <chart stuff> &dataURL=headcount.php Where, headcount.php is simply a bunch of php statements that return xml data: <?php echo "<chart caption='Monthly Headcount' >"; echo "<set label='20070701' value='117'/>"; echo "<set label='20070801' value='123'/>"; echo "<set label='20070901' value='122'/>"; echo "</chart>"; ?> If I put this xml data into a file called 'headcount.xml' and change chart to use &dataURL=headcount.xml it works just fine. But I want the xml data to be generated dynamically. Am I missing something here? I need a clue. Share this post Link to post Share on other sites
ac Report post Posted September 7, 2007 Stumbled upon the answer myself.... First, you want to inlcude header('Content-type: text/xml'); so you can directly view the xml data in a browser. This showed me I was missing the top level element. So I changed headcount.php to this and it works: <?php echo "<chart caption='Monthly Headcount'>"; echo "<set label='20070101' value='97'/>"; echo "<set label='20070201' value='96'/>"; echo "<set label='20070301' value='103'/>"; echo "<set label='20070401' value='108'/>"; echo "<set label='20070501' value='110'/>"; echo "<set label='20070601' value='115'/>"; echo "<set label='20070701' value='117'/>"; echo "<set label='20070801' value='123'/>"; echo "<set label='20070901' value='122'/>"; echo "</chart>"; ?> Share this post Link to post Share on other sites