Parenthesis in ofXml

I spend a lot of time tracking what error I was into, and I discovered why:

ofXml xml;
xml.appendChild("ChildName").setAttribute("value(x1000)", 1000);"FileName.xml");

wouldn’t load. The save is perfectly fine though.

It seems that the parenthesis are the problem “value(x1000)”. Altough I don’t think this should be an illegal character in XML 1.0:

I was hoping for some thoughts before adding an issue. It might be pugiXML’s fault also.

Also I notice that there is no way of checking if a tag or an attribute exists,
and you go straight into a crash if you try a non-existing tag/attribute.
ofXmlSettings has tagExists() and attributeExists()
If someone knows a way to check, I would be glad to read it !

to check you can just do:

auto child = xml.getChild("child");
    auto attribute = child.getAttribute("attribute");

it’s indeed weird that parenthesis get added but not read so it might be a bug in the library we use to parse xml. i’ll take a look but can you open a github issue?

Alright !
Thanks !
I don’t know if that makes sense to implement a operator bool() to getChildren() too ?
I also opened a issue yesterday about getFloatValue() yesterday.