Explicitly track XML generation state (indentation, element closure, etc.) so that clients can avoid manually/implicitly maintaining it.