I have an interim Kludge for now. I'm chopping the BOM piece off of
the XML and then sending it through as XML via REXML. It's working
like a charm now. It's not pretty, but it'll do until I figure out if
this is part of a bigger problem.
# Since this part of the string is always going to be same, slice the
first 39 characters
# Off of it.
bom_string_to_remove = login_result.slice(0, 39)
login_results = login_result.gsub(bom_string_to_remove,'')
So this…
<?xml version="1.0" encoding="utf-16"?>
<CallStatus><Code>InvalidPassword</Code>
<Success>false</Success>
<Message>Invalid password</Message>
</CallStatus>
Becomes this…
<CallStatus><Code>InvalidPassword</Code>
<Success>false</Success>
<Message>Invalid password</Message>
</CallStatus>
And, now I treat it as XML.