How can pugixml generate an attribute without a value?
Consider the following desired html:
<option value="book" selected>book</option>
The question is about the selected attribute, how to add this through pugixml.
Here is the code I currently use to generate that attribute:
option_node.append_attribute("selected");
This code adds an empty value to the attribute, as follows:
<option value="book" selected="">book</option>