Trex, aka Tree Regular Expressions for XML, is a grammar language created in 2001 by James Clark.
#2798on PLDB | 23Years Old |
TREX is a new language for validating XML documents. A TREX pattern specifies a pattern for the structure and content of an XML document. A TREX pattern thus identifies a class of XML documents consisting of those documents that match the pattern. A TREX pattern is itself an XML document.
<element name="addressBook">
<zeroOrMore>
<element name="card">
<element name="name">
<anyString/>
</element>
<element name="email">
<anyString/>
</element>
</element>
</zeroOrMore>
</element>