Proper XML closures