libyang  1.0.130
YANG data modeling language library
libyang XML Support

libyang XML parser is able to parse XML documents. The main purpose is to load data modeled by YANG. However, it can be used as a standalone XML parser with the following limitations in comparison to a full-featured XML parsers:

  • comments are ignored
  • Doctype declaration is ignored
  • CData sections are ignored
  • Process Instructions (PI) are ignored

The API is designed to almost only read-only access. You can simply load XML document, go through the tree as you wish and dump the tree to an output. The only "write" functions are lyxml_free() and lyxml_unlink() to remove part of the tree or to unlink (separate) a subtree.

XML parser is used internally by libyang for parsing YIN schemas and data instances in XML format.

Note
API for this group of functions is described in the XML Parser module.

Functions List