What is the difference between root node, root element and document element in XML?

In your XML:

  • a is the document element, sometimes called the root element, which is selected via /a.
  • The parent of a is the document’s root node, which is selected via /.

Leave a Comment