Jump to content

How to give current date in XML file before parsing


joshi_v

Recommended Posts

Hi Everyone,

 

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.

 

 


<?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_bankwatch_caption="Potential Attacks By Category" com_bankwatch_subcaption ="05-07 - 06-07" com_bankwatch_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_bankwatch_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

 

Joshi.

 

 

 

In this forum why we don't have any section for "XML"  ???

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.