Hi just started using processing to aid my Arduino development, and have just ran into a brick wall.
So far I have rect that travels along the path of a line, which is positioned manually.
My initial goal is to calculate the position of the line with data from an xml file and have the rect go along that line, however I do not know how to access deep enough to get to the relevant data in my file.
Here is a snippet of the file:
Code:- <slice>
- <dimension>
<x>44.97449</x>
<y>43.25116</y>
<z>10.0</z>
</dimension>
- <para>
<layerheight>10.0</layerheight>
<layerpitch>1.0</layerpitch>
<speed>1.0</speed>
</para>
- <layers num="1">
- <layer id="1">
- <loops num="6">
- <loop id="1">
- <line>
- <point>
<x>9.74318372</x>
<y>2.10971198</y>
<z>-2.6</z>
</point>
- <point>
<x>9.743058</x>
<y>2.11195086</y>
<z>-2.6</z>
</point>
</line>
It is the X, Y data from point I am trying to get.
Can anyone point me in the right direction please?
^_^
EDIT: Oh I see... nevermind I posted too soon
Code: String s2x = xml.getChild(2).getChild(0).getChild(0).getChild(0).getChild(0).getChild(0).getChild(0).getContent();
String s2y = xml.getChild(2).getChild(0).getChild(0).getChild(0).getChild(0).getChild(0).getChild(1).getContent();
works nicely for me, seems messy though