parser xml BUGFIX skip unknown elements only if not opaq
diff --git a/src/parser_xml.c b/src/parser_xml.c
index 5c355b8..b596c9f 100644
--- a/src/parser_xml.c
+++ b/src/parser_xml.c
@@ -494,10 +494,11 @@
ret = LY_EVALID;
goto cleanup;
}
-
- /* skip element with children */
- LY_CHECK_GOTO(ret = lydxml_data_skip(xmlctx), cleanup);
- continue;
+ if (!(lydctx->options & LYD_OPT_OPAQ)) {
+ /* skip element with children */
+ LY_CHECK_GOTO(ret = lydxml_data_skip(xmlctx), cleanup);
+ continue;
+ }
}
/* parser next */