yumapro  23.10T-7
YumaPro SDK
Loading...
Searching...
No Matches

YANG and other namespaces maintained in a registry. More...

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.
[in,out]msgincoming RPC message;
  • msg->errQ may be appended with new errors or warnings
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
[out]retvalval_value_t that should get the results of the parsing
  • *retval will be filled in
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.

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.

Parameters
buffzero-terminated buffer to parse
objobj_template_t for the object to parse
[out]returnQaddress of Q to store parsed value results
  • returnQ has 1 or more malloced val_value_t representing the parsed value(s)
Returns
return status
Here is the call graph for this function:

◆ 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: