XML structure error in ofxXmlSettings?

Hi folks,

Hope I’m in the right part of the forum for this one!

I’m looking at ofxXmlSettings and am seeing some strange behaviour which doesn’t correspond with how I understand the XML standard. Specifically, there should only be one root-level element:

An example from http://www.w3schools.com/xml/default.asp

<?xml version="1.0"?> Tove Jani Reminder Don't forget me this weekend!

According to them: XML documents must contain one element that is the parent of all other elements. This element is called the root element.

But in ofxXmlSettings.c it goes in search of:

//lets see how many tags there are in the xml file

and then the write operation keeps appending these root elements and I end up with a mySettings.xml that looks like this:

389 367 383 360 141 209 48.343750 136.265625 -87.000000 164 203

This kind of XML structure doesn’t appear to be correct to me and the ofxXmlSettings doesn’t appear to be looking for a root element in reading or writing a root element when saving?

Any thoughts?

**** 164 203

Ta, I’m not too worried about that . It’s more the missing root element that concerns me.

yes, that’s not correct, but the underlying library, doesn’t really know in which level you are working, so if for example you had all of that inside a tag the structure would be correct. you need to take care yourself of generating a root and then under that all the other tags

Thanks for the confirmation, Arturo - good to know I wasn’t missing anything…

Maybe I can take a look at changing the ofxXmlSettings example behaviour to correspond with valid XML structure… :slight_smile: