Syntax
char *XML_GetChildNodeValueByPath(
XML_HANDLE hXml,
XML_Node *parentNode,
const char *childNodePath,
int *ErrCode
);
Parameters
- hXml
- [in] XML handle
- parentNode
- [in] A pointer to the XML_Node structure of the parent node.
- childNodePath
- [in] A pointer to a string that specifies the relative path.
- ErrCode
- [out] A pointer to a variable that returns an error code. Specify NULL when no error code is required.
Return value
Returns a pointer to a string of the value for the specified node if the function succeeds, or NULL otherwise.Remarks
Finds a node according to the specified parent node and relative path.
If a node is found, returns a pointer to the string of the value for the node.
If the node found has no value, returns a pointer to the empty string ("").
If multiple nodes are found, the function fails and returns XML_NOT_UNIQUE_NODE in ErrCode.
If the node found is an intermediate node, the function fails and returns XML_NO_VALUE_IN_INTERMEDIATE_NODE in ErrCode.
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_NOT_FOUND | The node with the specified name was not found. |
XML_NOT_UNIQUE_INTERMEDIATE_NODE | Multiple nodes with the specified name were found in the middle of the node path. |
XML_NOT_UNIQUE_NODE | There are multiple nodes with the same name. |
XML_NO_VALUE_IN_INTERMEDIATE_NODE | Intermediate nodes are not allowed to have a value. |
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