Syntax
XML_Attribute *XML_SetAttribute(
XML_HANDLE hXml,
XML_Node *node,
const char *name,
const char *value,
int *ErrCode
);
Parameters
- hXml
- [in] XML handle
- node
- [in] A pointer to the XML_Node structure of the node.
- name
- [in] A pointer to a string of the name for the attribute.
- value
- [in] A pointer to a string of the value for the attribute.
- ErrCode
- [out] A pointer to a variable that returns an error code. Specify NULL when no error code is required.
Return value
If the attribute setting is successful, it returns a pointer to the XML_Attribute structure of the attribute, otherwise NULL.
Remarks
Sets the attribute specified by name and value to the specified node and returns a pointer to the XML_Attribute structure of the attribute.
If the attribute with the name specified by name already exists, it will be overwritten with the new value.
If the attribute with the name specified by name does not exist, a new attribute will be added.
If the function fails, it returns NULL and ErrCode returns the following error code:
Error code | Description |
---|---|
XML_INVALID_PARAMETER_ERROR | Parameter error |
XML_MEMORY_ALLOCATION_ERROR | Memory allocation error |
XML_INVALID_XML_OBJECT_ERROR | Invalid XML handle |
XML_INVALID_NODE_OBJECT_ERROR | Invalid node is specified. |
XML_UNICODE_CONVERSION_ERROR | Local code characters that cannot be converted to Unicode have been detected. |
Requirements
Header file:
XML.hLibrary file:
CodeConversion.h : ver. 1.1.1 or later.
libXML.a
libCodeConversion.a : ver.1.1.1 or later
libSTARTUPOPH5000.a
See also
Last updated: 2021/10/21