XML: tags, the tree and the procedure at the NETCONF counter
Every mechanism has a step-by-step animation, the configuration explained line by line and the exam notes. Where a parameter changes the outcome, you get a simulator in which you change it yourself.
TL;DR
XML is a text format for structured data: elements opened and closed by tags, nested in a tree with a single root, with attributes on the tags and text between them. The parser turns the text into a tree or stops with an error: well-formed is the syntax (one root, everything closed, correct nesting, “&” and “<” escaped), valid is conformance to a schema (XSD or, on devices, the YANG model). Namespaces, declared with xmlns, say which vocabulary each name belongs to; XPath addresses the nodes. In networking, XML is the NETCONF format (SSH 830): hello with capabilities, then rpc/rpc-reply pairs on datastores (running, candidate), with subtree filters and edit-config. YANG defines the model, encoded in XML (RFC 7950) or JSON (RFC 7951). In Python you read with lxml or ElementTree, and you never build XML by concatenating strings. The danger is the DTD: XXE, SSRF and billion laughs stop when you disable the DTD and external entities for any data from outside.
How to read the notes: red = critical for the exam, green = theory, blue = numbers, yellow = pitfalls, cyan = differences between platforms and standards. In the animations, the configuration lines used in the current step are highlighted automatically; the ← → arrows change the step when the animation is selected.
The analogy, in short
Think of a standard form filled in at a service counter: every field opens and closes, a single envelope holds them all, and the clerk (the parser) reads from top to bottom and rejects the form at the first formal mistake. NETCONF is the procedure at the counter, YANG is the rulebook that says which form is valid.
The model holds up to §7. From §8 on (the NETCONF procedure, the YANG encoding, attacks through the DTD), the analogy stretches; see the full correspondences and its limits in §14.