Removes some string-related allocations from XML libraries

While looking at string allocations in our code base, I noticed a couple that can be trivially avoided in the XML libraries.