Attributes in ofxXmlSettings?

Hey everybody, I have just finished a patch for the ofxXmlSettings addon, which will allow random-access to attributes in a way similar to the existing methods for accessing tag values. Here’s a link:

Note that I have included a modified version of the original ofxXmlSettings example (in the “ofxXmlSettings/examples/” folder) which demonstrates the added functionality. I have also modified the install.xml file slightly to reflect the changes.

Let me know what you think!

Hey again, I just realized that the code I published has some massive, glaring grammatical errors. Plus, the link does not work for anyone but me… :oops:

Anyways, I am updating the link, and remaking it to a copy of my newest ofxXmlSettings patch folder, zipped and uploaded somewhere.

Hey, it’s fixed (the code AND the link), but just a side note: The example is based on the 0.05 prerelease, and will not work through 0.06.

I had wanted this to be incorporated into the 0.06 launch, but I guess I missed it. (Or did I? I haven’t checked it yet.)

Hey, just a bump for this topic, as I realized that the last few links I posted didn’t work. Sorry everyone! The link on the first post has been updated, use that one. Thanks!

Thought I’d mention I’ve just started using this to read an xml file with attributes and it seems to work well.

It would be great to have this in the next version of OF - attributes are sorely missed from the current addon.



I hope you don’t mind, but I took your additions and made a few changes of my own - you can read about them here.

In summary, I changed the arguments from string to const string&, got rid of all the dynamic memory allocation, fixed a few small bugs and simplified some of the code.

Hope you find the changes useful, and thanks again for the attributes code.


No, thanks a lot! I’m just glad to have helped. It’s been some time since I even touched this code, I just really whipped it together in a couple hours at school. At least someone has taken notice…