@VVZen wrote:
Hi guys,
I'm currently trying to parse a XML file using ofxXmlSettings.
Everything is going fine, but when I try to get the attributes of the following<use>tag I find none.
I am at the<g>level and I'm usingsettings.getAttributeNames("use", outNames); // where settings is an ofxXmlSettings object // and outNames a vector<string>& for storing the result names cout << "<use> attributes: "; for(int c = 0; c < outNames.size(); c++){ cout << outNames[c] << ", "; } cout << endl;My input xml is:
<g style="blabla"> <use xlink:href="#glyph0-2" x="533.410845" y="611.697416"/> </g>When I modified the xml in this way (with the tag closed in the non abbreviated way), I was able to get the attributes:
<g style="blabla"> <use xlink:href="#glyph0-2" x="533.410845" y="611.697416"> </use> </g>Do you know if this is a bug or my fault? Is there some workaround?
Namasté
Posts: 2
Participants: 1