ofXml: loadFromBuffer(): DOM ERROR


I’m using vs2012 with OFv0.8.0 on Win7. I list files in a directory with ofDirectory and passing one of the values (which is a valid xml file) to ofXml. I can read and validate the files with a browser but I always get the error:

ofXml: loadFromBuffer(): DOM ERROR

The code is:

string filename = “xml\699948.xml”;

for(int i = 0; i < (int)dir.size(); i++){
	string p = dir.getPath(i);
	p += "\n";

	if(i ==0) filename = p;

// load the xml file

if( XML.load(filename) ){
	message = filename+" loaded!";
	message = "unable to load "+filename+" check data/ folder";        

I’ve tried running the exe from VS2012 debugger and via bin but no luck.

Any ideas?


Hi, any signifcations of this error ?
I got the same with an xml freshly saved from ofGui… and i’m not able to load my settings.

Can someone help to understand ?


I run into the same issue today and fixed it by not using white spaces and capital letters when setting the parameter’s name. Hope this helps next time @vj_dudley_smith

1 Like