Excellent question. I've added also a FAQ entry here:
http://openideas.info/wiki/index.php?title=Pandora:FAQ#I_want_to_generate_my_own_XML.2C_simulating_data_from_an_agent.2C_why_my_XML_doesnt_workThanks for asking interesting things :-)
At first sight the XML lacks of interval parameter in <agent_data> and if my memory doesn't trick me, the timestamp information inside the module data is not allowed if it's not contained in a datalist structure. I'm almost sure that following XML would work:
<agent_data agent_name="test2" timestamp="2010-09-06 22:10:00" version="1.0" os="Other"
os_version="1.0" interval="300">
<module>
<name>5min</name>
<type>generic_data</type>
<datalist>
<data>
<value>73.3</value>
<timestamp>2010-09-06 22:05:00</timestamp>
</data>
</datalist>
</module>
</agent_data>
Or a simple one witout data information:
<agent_data agent_name="test2" timestamp="2010-09-06 22:10:00" version="1.0" os="Other"
os_version="1.0" interval="300">
<module>
<name>5min</name>
<type>generic_data</type>
<data>73.3</data>
</module>
</agent_data>
I am generating simple XML data as below
<agent_data agent_name="test2" timestamp="2010-09-06 22:10:00" version="1.0" os="Other"
os_version="1.0">
<module>
<name>5min</name>
<type>generic_data</type>
<data>73.3</data>
<timestamp>2010-09-06 22:05:00</timestamp>
</module>
</agent_data>
I found that whenever if i have data of the same value in my next XML entry, the data will not be recorded in database. Can anyone explain why? How can I recover my data? Many thanks!!!
Cheers,
Chong