|
I am at my wits end with this, perhaps I am going about it all wrong, it is late and I cannot think straight anymore.
I trying to get the vertex count of exported data.
The exported data is a collada.xml file.
so what i did, and perhaps this is my misake, I approached it from the angle of parsing the collada file and generating an array of all lines (this worked very well for getting number of bones etc)
loc_readXML = (dotnetClass "System.IO.File").ReadAllLines XMLFile -- convert xml to ARRAY OF STRINGS
(Btw, eternal gratitude to Paul Neale for this)
Then I know that I have iterate thru that array and find an index that contains the following string:
<float_array id="Teapot01-mesh-positions-array" count="1590">
easy enough, I run 2 checks, one for “<float_array id=” and the second check for “mesh-positions-array”, this results in the correct indeces being returned.
In my test file, there are 2 objects, so I get 2 hits, so far so good.
the problem is that all i need is that “1590” above and the corresponding value from the other index (it is “24” btw, not that it matters)
trimleft and trimright don’t work too well,since there will be arbritary names added where is says “teapot01”, and there is a large number of vertex positions after the count="1590">, for example: count="1590">0.0 -0.165 0.124 etc
ALL I NEED IS TO GET THAT 1590 as an integer!
I am sorry I am exausted.
MB
please help if you can.....
|