I am working with documents that contain valid xml only to a certain depth once that depth is reached there might be invalid xml however one can be sure that inside the invalid