libnetconf's functions for handling the NETCONF <rpc-reply> messages. These functions accepts parameters as libxml2 structures.
More...
libnetconf's functions for handling the NETCONF <rpc-reply> messages. These functions accepts parameters as libxml2 structures.
nc_reply* ncxml_reply_build |
( |
xmlDocPtr |
reply_dump | ) |
|
Build <rpc-reply> message from the libxml2 document structure. This is the reverse function of the ncxml_reply_dump().
- Parameters
-
[in] | reply_dump | XML document structure with the NETCONF <rpc-reply> message. The structure is integrated into the internal rpc structure and caller should not access (or free) the given XML document anymore. |
- Returns
- Complete reply structure used by libnetconf's functions.
nc_reply* ncxml_reply_data |
( |
const xmlNodePtr |
data | ) |
|
Create rpc-reply response with <data> content.
- Parameters
-
data | Content (possibly a node list) for the <rpc-reply>'s <data> element. |
- Returns
- Created <rpc-reply> message.
nc_reply* ncxml_reply_data_ns |
( |
const xmlNodePtr |
data, |
|
|
const char * |
ns |
|
) |
| |
Create rpc-reply response with <data> content in the specified namespace.
- Parameters
-
| data | Content (possibly a node list) for the <rpc-reply>'s <data> element. |
[in] | ns | Default namespace for the data element. |
- Returns
- Created <rpc-reply> message.
xmlDocPtr ncxml_reply_dump |
( |
const nc_reply * |
reply | ) |
|
Dump the rpc-reply message into a libxml2 document structure.
- Parameters
-
[in] | reply | rpc-reply message. |
- Returns
- XML document of the NETCONF's <rpc-reply> message. Caller is supposed to free the returned structure with xmlFreeDoc().
xmlNodePtr ncxml_reply_get_data |
( |
const nc_reply * |
reply | ) |
|
Get <data> element in <rpc-reply> including its content.
- Parameters
-
- Returns
- XML node <data> with its content. <data> is included to provide a valid (non-NULL) output in case of empty data returned (e.g. when all the data are filterred out). Caller is supposed to free the returned structure with xmlFreeNode().