deanmachine333
asked on
how to create animation with x y co-ordinates from XML data feed
Hello
I have a XML data feed with many events that happen one of which is im trying to use the data from the xml file to display it graphically on screen with some sort of graphics (2d , 3d etc)
example of xml-
<t sequence="1121" t-type-id="2" t type="Inter" x-coord="100" y-coord="43" x-coord-end="" y-coord-end=""/>
<t sequence="1122" t-type-id="24" t-type="KPU" x-coord="97" y-coord="44" x-coord-end="" y-coord-end=""/>
<t sequence="1123" t-type-id="12" t-type="GKLB" x-coord="96" y-coord="41" x-coord-end="47" y-coord-end="53"/>
whats this best way to do this ?( note novice )
any software that can do this , and maybe add in the extra events and display accordingly?
Thanks
D
I have a XML data feed with many events that happen one of which is im trying to use the data from the xml file to display it graphically on screen with some sort of graphics (2d , 3d etc)
example of xml-
<t sequence="1121" t-type-id="2" t type="Inter" x-coord="100" y-coord="43" x-coord-end="" y-coord-end=""/>
<t sequence="1122" t-type-id="24" t-type="KPU" x-coord="97" y-coord="44" x-coord-end="" y-coord-end=""/>
<t sequence="1123" t-type-id="12" t-type="GKLB" x-coord="96" y-coord="41" x-coord-end="47" y-coord-end="53"/>
whats this best way to do this ?( note novice )
any software that can do this , and maybe add in the extra events and display accordingly?
Thanks
D
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you break it down like that it is much easier. Because you have the topic, "Misc Web Dev" in your question, I assume you want to get this in the browser on a web site. You can do all of this just using html, css and javascript/jquery including charting libraries that will typically be in javascript.
A charting library could be http://www.chartjs.org/ or http://www.highcharts.com/ or http://d3js.org/ and http://www.flotcharts.org/. There are more, but these are a good start.
Using http://www.flotcharts.org/flot/examples/basic-usage/index.html if you view the source
Open in new window
You simply need to include jquery (first) then the flot js files.In the html, this is where the flot chart will show up when the browser renders
Open in new window
Below defines the x/y coordinates for 3 different lines. If you just look at the d2 line, that is the simplest.
Open in new window
Now your issue is how do you get this line, var d2 = [[0, 3], [4, 8], [8, 5], [9, 13]]; from your xml. That part can be done in javascript/jquery as well. If you need help in that, I would suggest a separate question for each of these steps to keep the thread easy.