hi all.
I’m currently extending ofxXmlSettings to add it reading of attributes. Here’s the method I’m trying in my subclass
create a method which mimics getValue to get the attribute as a string.
string getAttribute(string tag, string attribute, string defaultValue);
but then I have to create a method readAttribute which mimics readTag but fills the char * with the value of the desired attribute instead of the node. something like this
bool readAttribute(string tag, string attribute, char * attributeString, int which = 0);
the problem i’ve found is that the tokenize method used in readTag (which is useful for me too for navigating tags) is a static method in ofxXmlSettings, so it is not available for me. I’ve just copied it to my class and it works, but that feels really ugly… Is there a reason for it to be static?
I’m still learning, so I’m happy to hear any theory
also, any other approach is highly welcome.
thanks a lot!
jesús.