Remove unnecessary allocations

While looking at string allocations in our code base,
I noticed a couple that can be trivially avoided in the XML libraries.
Merge pull request #151 from KrzysztofCwalina/dotnet2

Removes some string-related allocations from XML libraries