yumapro  20.10-13
YumaPro SDK
Collaboration diagram for XML Parser:

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...
 

Detailed Description

YANG and other namespaces maintained in a registry

Function Documentation

◆ xml_parse_btype_nc()

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

Parameters
scbsession control block Input is read from scb->reader.
msgincoming RPC message; Errors are appended to msg->errQ
objobject template to use for parsing
startnodetop node of the parameter to be parsed Parser function will attempt to consume all the nodes until the matching endnode is reached
parentdcdata class of the parent node, which will get used if it is not explicitly set for the typdef
retvalval_value_t that should get the results of the parsing
Return values
*retvalwill be filled in
msg->errQmay be appended with new errors or warnings
Returns
status
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xml_parse_buffer()

status_t xml_parse_buffer ( xmlChar *  buff,
obj_template_t *  obj,
dlq_hdr_t *  returnQ 
)

Parse buffer of XML into val_value_t structs.

Parameters
buffzero-terminated buffer to parse
objobj_template_t for the object to parse
returnQaddress of Q to store parsed value results
Return values
returnQhas 1 or more malloced val_value_t representing the parsed value(s)
Returns
return status

◆ xml_parse_consume_node()

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.

Parameters
scbsession control block Input is read from scb->reader.
advanceTRUE to advance the XmlTextReader
nodepointer to an initialized xml_node_t struct to be filled in
layerprotocol layer of caller (only used if errQ != NULL)
msghdrmsg hdr w/ Q to get any rpc-errors as found, NULL if not used
eoferrTRUE if an End of File error should be generated
FALSE if not
nserrTRUE if bad namespace should be checked
FALSE if not
Returns
status of the operation Try to fail on fatal errors only
Here is the call graph for this function:
Here is the caller graph for this function: