Allocates a new attribute from the pool, and optionally assigns name and value to it. If the allocation request cannot be accomodated, this function will throw std::bad_alloc
. If exceptions are disabled by defining RAPIDXML_NO_EXCEPTIONS, this function will call rapidxml::parse_error_handler() function.
- Parameters:
-
name | Name to assign to the attribute, or 0 to assign no name. |
value | Value to assign to the attribute, or 0 to assign no value. |
name_size | Size of name to assign, or 0 to automatically calculate size from name string. |
value_size | Size of value to assign, or 0 to automatically calculate size from value string. |
- Returns:
- Pointer to allocated attribute. This pointer will never be NULL.
References xml_base< Ch >::name(), and xml_base< Ch >::value().
Referenced by memory_pool< Ch >::clone_node().