Updates doctests to use fromstring() method instead of read().
Merge pull request #666 from Liechti/develop

Updates doctests to use fromstring() method instead of read().