pushTag in ofxXMLSettings .GML

Hi All,

Working on implementing .GML in SKTCH and it’s pretty much working apart from one thing (the main thing) which is driving me up the wall.

At the moment, with using the example, the points drawn are written to XML in the root level.

if( XML.pushTag("stroke", lastTagNumber) ){	  
   int tagNum = XML.addTag("pt");  
   XML.setValue("pt:x", touch.x, tagNum);  
   XML.setValue("pt:y", touch.y, tagNum);  

This code seems to find the latest “stroke” tag and adds points to it…which is great…but it needs to be moved into the appropriate .gml tree level ie:


Even if I:
XML.addTag(“gml:tag:drawing:stroke”); to create the tag for the points to go into, the points are not written at all, seems like it’s can’t find the “last tag”.

With standard setup, ie creating XML.addTag(“stroke”); i get the following results:

before I draw any points:



and once I draw points, it does this:

109.000000 374.000000 113.000000 344.000000 144.000000 259.000000 175.000000 193.000000 195.000000 148.000000 199.000000 138.000000 205.000000 121.000000 206.000000 117.000000 206.000000 119.000000 50.000000 50.000000 50.000000 100.000000 250.000000 250.000000

So this kind of works for the app, ie being able to save and open files but not for GML unless someone manually moves tag into the tree gml:tag:drawing:stroke =[

I suppose i need a function which writes strokes to the existing location of the stroke tag but push tag doesn’t seem to be able to find it…