yumapro
23.10T-12
YumaPro SDK
|
YANG and other namespaces maintained in a registry. More...
Functions | |
status_t | xml_parse_btype_nc (ses_cb_t *scb, xml_msg_hdr_t *msg, obj_template_t *obj, const xml_node_t *startnode, ncx_data_class_t parentdc, val_value_t *retval) |
Parse the XML node. More... | |
status_t | xml_parse_consume_node (ses_cb_t *scb, boolean advance, xml_node_t *node, ncx_layer_t layer, xml_msg_hdr_t *msghdr, boolean eoferr, boolean nserr) |
Internal consume XML node function. More... | |
status_t | xml_parse_buffer (xmlChar *buff, obj_template_t *obj, dlq_hdr_t *returnQ) |
Parse buffer of XML into val_value_t structs. More... | |
YANG and other namespaces maintained in a registry.
status_t xml_parse_btype_nc | ( | ses_cb_t * | scb, |
xml_msg_hdr_t * | msg, | ||
obj_template_t * | obj, | ||
const xml_node_t * | startnode, | ||
ncx_data_class_t | parentdc, | ||
val_value_t * | retval | ||
) |
Parse the XML node.
Switch to dispatch to specific base type handler
scb | session control block Input is read from scb->reader. | |
[in,out] | msg | incoming RPC message;
|
obj | object template to use for parsing | |
startnode | top node of the parameter to be parsed Parser function will attempt to consume all the nodes until the matching endnode is reached | |
parentdc | data class of the parent node, which will get used if it is not explicitly set for the typdef | |
[out] | retval | val_value_t that should get the results of the parsing
|
status_t xml_parse_buffer | ( | xmlChar * | buff, |
obj_template_t * | obj, | ||
dlq_hdr_t * | returnQ | ||
) |
Parse buffer of XML into val_value_t structs.
If the target of the request is a list the XML cannot have multiple top level list entries that would make malformed XML. So, use the parent of this list as target for parsing and consume all list entries using its parent as a wrapper.
If a parent is a root, then the <config> object is expected. If a parent is another node, use that node object for parsing.
buff | zero-terminated buffer to parse | |
obj | obj_template_t for the object to parse | |
[out] | returnQ | address of Q to store parsed value results
|
status_t xml_parse_consume_node | ( | ses_cb_t * | scb, |
boolean | advance, | ||
xml_node_t * | node, | ||
ncx_layer_t | layer, | ||
xml_msg_hdr_t * | msghdr, | ||
boolean | eoferr, | ||
boolean | nserr | ||
) |
Internal consume XML node function.
scb | session control block Input is read from scb->reader. |
advance | TRUE to advance the XmlTextReader |
node | pointer to an initialized xml_node_t struct to be filled in |
layer | protocol layer of caller (only used if errQ != NULL) |
msghdr | msg hdr w/ Q to get any rpc-errors as found, NULL if not used |
eoferr | TRUE if an End of File error should be generated FALSE if not |
nserr | TRUE if bad namespace should be checked FALSE if not |