Yeah, it would have required another xml function for this one specific use-case. If we ever decide to duplicate this somewhere else we should move this logic into xml.c