Updated serialization to properly serialize for xml

Serialization wasn't working for XML. I added a test and updated how it serializes/deserializes strings to properly handle a raw string from an XML tag.