“…Nested words capture models where there is both a linear sequencing of positions and a hierarchical matching of nested positions, like in XML documents where each open tag is matched with a corresponding closing tag. While trees and tree automata are often used as models of XML, see [19,23,24], nested word automata may be more natural for this task, especially when the document needs to be processed sequentially. It can be noted that, by interpreting trees as special cases of nested words, (restricted) nested word automata can be used to define regular tree languages [1,4].…”