Open rabhat31 opened 1 year ago
You should check return values and look at any errors. The behavior you described may be correct so mention what is the behavior you expect and include any error messages.
There are no error messages. Could you explain why the behavior may be correct? Why does the native tree in 3 show up as empty even though we've loaded the correct schema. And why does 5 work when I add the LYD_PARSE_ONLY flag and then validate explicitly?
Please attach the exact YANG modules with all their imports that you are using. I have tried it with some arbitrary revision and there were unknown nodes in both data trees.
We're using the models from https://github.com/YangModels/yang/tree/main/vendor/cisco/xe/17121
Fine, please modify my test to reproduce the exact problem you have. It all behaved as expected for me except using only LYD_PARSE_STRICT
does not work, you must use at least LYD_VALIDATE_PRESENT
so that the data succeed validation and are parsed.
Hi, I'm running into a weird issue with parsing XMLs under certain conditions.
lyd_parse_data_mem
with only the LYD_PARSE_STRICT flag.<native>
tree ,lyd_parse_data_mem
returns a NULL lyd_node.<mdt-cfg-data>
tree ,lyd_parse_data_mem
returns a properly populated lyd_node.Example XMLs: MDT XML:
NATIVE XML: