#ZegnatNot just technically. The spec can be applied to anything that has the concept of children, attributes, and classes. Generally. So anything that can be expressed by DOM can be parsed. I think the PHP parser takes raw DOMDocuments as input, so those do not depend on HTML at all.