Sets the value of the specified node.

Syntax

bool XML_SetNodeValue(
  XML_HANDLE xml,
  XML_Node *node,
  const char *value,
  int *ErrCode
)

Parameters

hXml
[in] XML handle
nodePath
[in] A pointer to the XML_Node structure of the node.
value
[in] A pointer to a string of the value to set on a node.
ErrCode
[out] A pointer to a variable that returns an error code. Specify NULL when no error code is required.

Return value

Returns true if the function succeeds, false otherwise.

Remarks

Changes the value of the specified node to the value specified by value.

If the specified node is an intermediate node, the function fails and returns XML_NO_VALUE_IN_INTERMEDIATE_NODE in ErrCode.

If the function fails, it returns false and ErrCode returns the following error code:

Error codeDescription
XML_INVALID_PARAMETER_ERRORParameter error
XML_MEMORY_ALLOCATION_ERRORMemory allocation error
XML_INVALID_XML_OBJECT_ERRORInvalid XML handle
XML_INVALID_NODE_OBJECT_ERRORInvalid node is specified.
XML_NO_VALUE_IN_INTERMEDIATE_NODEIntermediate nodes are not allowed to have a value.

Requirements

Header file:
XML.h
CodeConversion.h : ver. 1.1.1 or later.
Library file:
libXML.a
libCodeConversion.a : ver.1.1.1 or later
libSTARTUPOPH5000.a

See also



Last updated: 2021/10/21