I’ve got a bit of a strange one, when I use this code example, similar to the example on http://www.openframeworks.cc/documentation/ofxXmlSettings/ofxXmlSettings.html:
ofxXmlSettings positions;
positions.addTag("srcVecs");
positions.pushTag("srcVecs");
for(int i = 0; i < srcVecs.size(); i++){
positions.addTag("srcVec");
positions.pushTag("srcVec");
positions.addValue("X", srcVecs[i].x);
positions.addValue("Y", srcVecs[i].y);
positions.popTag();
}
positions.popTag();
I get this :
<srcVecs>
<srcVec>
<X>0</X>
<Y>0</Y>
<X>1024</X>
<Y>0</Y>
<X>0</X>
<Y>768</Y>
<X>1024</X>
<Y>768</Y>
</srcVec>
<srcVec></srcVec>
<srcVec></srcVec>
<srcVec></srcVec>
</srcVecs>
when I would expect this :
<srcVecs>
<srcVec>
<X>0</X>
<Y>0</Y>
</srcVec>
<srcVec>
<X>1024</X>
<Y>0</Y>
</srcVec>
<srcVec>
<X>0</X>
<Y>768</Y>
</srcVec>
<srcVec>
<X>1024</X>
<Y>768</Y>
</srcVec>
</srcVecs>
Have I done something stupid?
Seb