tags:

views:

2

answers:

0

Hi All,

I have the following input xml file:

    <Company >
    <shareprice>
        <timeStamp> 12:00:00.01</timeStamp>
        <Price>  25.02</Price>
    </shareprice>

    <shareprice>
        <timeStamp> 12:00:00.02</timeStamp>
        <Price>  15</Price>
    </shareprice>

    <shareprice>
        <timeStamp> 12:00:01.025</timeStamp>
        <Price>  15.02</Price>
    </shareprice>

    <shareprice>
        <timeStamp> 12:00:01.031</timeStamp>
        <Price>  18.25</Price>
    </shareprice>

    <shareprice>
        <timeStamp> 12:00:01.039</timeStamp>
        <Price>  18.54</Price>
    </shareprice>

    <shareprice>
        <timeStamp> 12:00:01.050</timeStamp>
        <Price> 16.52</Price>
    </shareprice>

    <shareprice>
        <timeStamp> 12:00:02.01</timeStamp>
        <Price>  17.50</Price>
    </shareprice>

    <shareprice>
        <timeStamp> 12:00:03.01</timeStamp>
        <Price>  25.02</Price>
    </shareprice>

    <shareprice>
        <timeStamp> 12:00:05.02</timeStamp>
        <Price>  30</Price>
    </shareprice>

    <shareprice>
        <timeStamp> 12:00:11.025</timeStamp>
        <Price>  32.25</Price>
    </shareprice>

    <shareprice>
        <timeStamp> 12:00:12.031</timeStamp>
        <Price>  26.05</Price>
    </shareprice>

    <shareprice>
        <timeStamp> 12:00:15.039</timeStamp>
        <Price>  18.54</Price>
    </shareprice>

    <shareprice>
        <timeStamp> 12:00:19.050</timeStamp>
        <Price> 16.52</Price>
    </shareprice>

    <shareprice>
        <timeStamp> 12:01:02.01</timeStamp>
        <Price>  17.50</Price>
    </shareprice>
</Company>

I carry out some analysis in R and produce two XML files. The first output file is in the format for a FusionChart Free Chart:

<graph caption="Share Data Wave" subcaption="For Person's Name" xAxisName="Time"  yAxisMinValue="-0.025" yAxisName="Voltage" decimalPrecision="5" formatNumberScale="0" numberPrefix="" showNames="1" showValues="0" showAlternateHGridColor="1" AlternateHGridColor="ff5904" divLineColor="ff5904" divLineAlpha="20" alternateHGridAlpha="5">
    <set name="2010-08-26 12:00:21.040" value="25.020000" hoverText = "The difference  from last value: 0" ></set>
    <set name="2010-08-26 12:01:02.531" value="15.000000" hoverText = "The difference from last value: -10.02" ></set>
     <set name="2010-08-26 12:02:02.212" value="15.020000" hoverText = "The difference from last value: 0.0199999999999996" ></set>
    <set name="2010-08-26 12:02:09.426" value="18.250000" hoverText = "The difference from last value: 3.23" ></set>
     <set name="2010-08-26 12:02:20.364" value="18.540000" hoverText = "The difference from last value: 0.289999999999999" ></set>
     <set name="2010-08-26 12:02:58.058" value="16.520000" hoverText = "The difference from last value: -2.02" ></set>
     <set name="2010-08-26 12:03:10.262" value="17.500000" hoverText = "The difference from last value: 0.98" ></set>
     <set name="2010-08-26 12:03:13.085" value="25.020000" hoverText = "The difference from last value: 7.52" ></set>
    <set name="2010-08-26 12:04:07.601" value="30.000000" hoverText = "The difference from last value: 4.98" ></set>
     <set name="2010-08-26 12:04:57.355" value="32.250000" hoverText = "The difference from last value: 2.25" ></set>
     <set name="2010-08-26 12:05:07.259" value="26.050000" hoverText = "The difference from last value: -6.2" ></set>
     <set name="2010-08-26 12:05:15.503" value="18.540000" hoverText = "The difference from last value: -7.51" ></set>
     <set name="2010-08-26 12:06:06.538" value="16.520000" hoverText = "The difference from last value: -2.02" ></set>
     <set name="2010-08-26 12:06:49.746" value="17.500000" hoverText = "The difference from last value: 0.98" ></set>
</graph>

My question is after seeing the full chart a user only wants to see data between times. In the above format it would be the name tag. How can I edit the xml file to show just the requested data points. Can this be done using a PHP form (or something similar)?