我有下面的XML文件:使用PHP來改變XML文件
<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-27 12:00:20.636" value="25.020000" hoverText = "The difference from last value: 0" ></set>
<set name="2010-08-27 12:01:19.473" value="15.000000" hoverText = "The difference from last value: -10.02" ></set>
<set name="2010-08-27 12:01:24.494" value="15.020000" hoverText = "The difference from last value: 0.0199999999999996" ></set>
<set name="2010-08-27 12:01:44.188" value="18.250000" hoverText = "The difference from last value: 3.23" ></set>
<set name="2010-08-27 12:02:11.851" value="18.540000" hoverText = "The difference from last value: 0.289999999999999" ></set>
<set name="2010-08-27 12:02:47.109" value="16.520000" hoverText = "The difference from last value: -2.02" ></set>
<set name="2010-08-27 12:03:01.199" value="17.500000" hoverText = "The difference from last value: 0.98" ></set>
<set name="2010-08-27 12:03:03.030" value="25.020000" hoverText = "The difference from last value: 7.52" ></set>
<set name="2010-08-27 12:03:40.570" value="30.000000" hoverText = "The difference from last value: 4.98" ></set>
<set name="2010-08-27 12:04:27.490" value="32.250000" hoverText = "The difference from last value: 2.25" ></set>
<set name="2010-08-27 12:05:03.738" value="26.050000" hoverText = "The difference from last value: -6.2" ></set>
<set name="2010-08-27 12:05:14.511" value="18.540000" hoverText = "The difference from last value: -7.51" ></set>
<set name="2010-08-27 12:06:09.728" value="16.520000" hoverText = "The difference from last value: -2.02" ></set>
<set name="2010-08-27 12:06:58.329" value="17.500000" hoverText = "The difference from last value: 0.98" ></set>
</graph>
是否有PHP的方式來改變這個文件只是顯示一些數據點2010-08-27 12間說: 02:11.851(開始時間)至2010-08-27 12:05:03.738(結束時間),並向用戶提供開始時間的下拉菜單和結束時間的下拉菜單,同時保持頂部標籤和底部標籤?
有什麼建議嗎?
問候,
安東尼
確定這是可能的。你的問題到底是什麼?你卡在哪裏? – 2010-08-27 08:52:08
SimpleXML或DomDocument可以幫助你在這裏 – 2010-08-27 08:58:22
@Pekka編程能力是關於我卡在哪裏的最簡單的答案。我一直在做大量的閱讀,但它導致信息過載,我意識到這個文檔不是正確的XML。 – 2010-08-27 09:30:30