correcting getValueFromXml

errors when the value is only one character.