* xmlNewProp: * @node: the parent node (optional) * @name: the name of the attribute * @value: the value of the attribute (optional) * * Create an attribute node. * * If provided, @value should be a raw, unescaped string. * * If @node is provided, the created attribute will be appended without * checking for duplicate names. It is an error if @node is not an * element. * * Returns
| 1776 | * or a memory allocation failed. |
| 1777 | */ |
| 1778 | xmlAttrPtr |
| 1779 | xmlNewProp(xmlNodePtr node, const xmlChar *name, const xmlChar *value) { |
| 1780 | |
| 1781 | if (name == NULL) { |
| 1782 | return(NULL); |
| 1783 | } |
| 1784 | |
| 1785 | return xmlNewPropInternal(node, NULL, name, value, 0); |
| 1786 | } |
| 1787 | #endif /* LIBXML_TREE_ENABLED */ |
| 1788 | |
| 1789 | /** |
no test coverage detected