* xmlNodeGetAttrValue: * @node: the node * @name: the attribute name * @nsUri: the URI of the namespace * @out: the returned string * * Search and get the value of an attribute associated to a node * This attribute has to be anchored in the namespace specified. * This does the entity substitution. The returned value must be * freed by the caller. * * Available since 2.13.0. * * Re
| 6761 | * memory allocation failed. |
| 6762 | */ |
| 6763 | int |
| 6764 | xmlNodeGetAttrValue(const xmlNode *node, const xmlChar *name, |
| 6765 | const xmlChar *nsUri, xmlChar **out) { |
| 6766 | xmlAttrPtr prop; |
| 6767 | |
| 6768 | if (out == NULL) |
| 6769 | return(1); |
| 6770 | *out = NULL; |
| 6771 | |
| 6772 | prop = xmlGetPropNodeInternal(node, name, nsUri, 0); |
| 6773 | if (prop == NULL) |
| 6774 | return(1); |
| 6775 | |
| 6776 | *out = xmlGetPropNodeValueInternal(prop); |
| 6777 | if (*out == NULL) |
| 6778 | return(-1); |
| 6779 | return(0); |
| 6780 | } |
| 6781 | |
| 6782 | /** |
| 6783 | * xmlGetProp: |
no test coverage detected