Appends a new attribute to the node. \param attribute Attribute to append.
| 1215 | //! Appends a new attribute to the node. |
| 1216 | //! \param attribute Attribute to append. |
| 1217 | void append_attribute(xml_attribute<Ch> *attribute) |
| 1218 | { |
| 1219 | assert(attribute && !attribute->parent()); |
| 1220 | if (first_attribute()) |
| 1221 | { |
| 1222 | attribute->m_prev_attribute = m_last_attribute; |
| 1223 | m_last_attribute->m_next_attribute = attribute; |
| 1224 | } |
| 1225 | else |
| 1226 | { |
| 1227 | attribute->m_prev_attribute = 0; |
| 1228 | m_first_attribute = attribute; |
| 1229 | } |
| 1230 | m_last_attribute = attribute; |
| 1231 | attribute->m_parent = this; |
| 1232 | attribute->m_next_attribute = 0; |
| 1233 | } |
| 1234 | |
| 1235 | //! Inserts a new attribute at specified place inside the node. |
| 1236 | //! All attributes after and including the specified attribute are moved one position back. |
no test coverage detected