xml helper cleanup; added as.text option