Tree building of doctypes.