libxml2
<!DOCTYPE doc [ <!ELEMENT doc (a, b, a)> <!ELEMENT a EMPTY> <!ELEMENT b EMPTY> ]> <doc><b/><a/><b/></doc>