I have XML file. It have some date to display the Graph. In that file i need to provide the date value. I would like to give the current date instead of hard coded date. I tried someways that i found in net , but no use of it. Can anyone help how to do this.
This is my XML file.
Expand|Select|Wrap|Line Numbers
- <?xml version="1.0" ?>
- <!-- created: Fri May 4 10:18:56 2007 -->
- <graph animation="1" bgColor="FFFFFF" canvasBgColor="FFFFFF" canvasbordercolor="CCCCCC" canvasborderthickness="1" canvasbgalpha="100" hovercapbgColor="FFFFFF" basefontcolor="000000" outcnvbasefontsize="10" areabordercolor="ffffff" hoverCapBorderColor="CCCCCC" PYAxisMinValue="0" numdivlines="4" divLineColor="FFFFFF" decimalPrecision="0" shownames="1" showAlternateHGridColor="1" alternateHGridColor="CCCCCC" showAlternateVGridColor="1" alternateVGridColor="CCCCCC" alternateVGridAlpha="80" showSecondaryLimits="1" showDivLineSecondaryValue="1" PYAxisName="" SYAxisName="" SYAxisMaxValue="420000" PYAxisMaxValue="420000" numVdivlines="10" formatNumberScale="1" showLegend="0" com_testing_caption="Potential Attacks By Category" com_testing_subcaption ="05-07 - 06-07" com_testing_changepct="-55.4%">
- <categories>
- <category name="May"/>
- <category name="Jun"/>
- <category name="Jul"/>
- <category name="Aug"/>
- <category name="Sep"/>
- <category name="Oct"/>
- <category name="Nov"/>
- <category name="Dec"/>
- <category name="Jan"/>
- <category name="Feb"/>
- <category name="Mar"/>
- <category name="Apr"/>
- </categories>
- <dataset color="000080" areaBorderColor="000080" seriesName="other-activity" showValues="0">
- <set value="3598"/>
- <set value="2626"/>
- <set value="2174"/>
- <set value="7109"/>
- <set value="1154"/>
- <set value="3150"/>
- <set value="3391"/>
- <set value="7208"/>
- <set value="14767"/>
- <set value="2312"/>
- <set value="11950"/>
- <set value="9084"/>
- </dataset>
- </graph>
In the above code, i want to replace "com_testing_subcaption ="05-07 - 06-07" " with the current date. from PHP i can't pass any variable to this.
I would appriciate any suggestions that would help to get it work.
Thanks in advance :)