To answer something posted deep down... It is fine with me if there are two functions - one to parse a file or file handler and one to parse a string, yet the returned objects should be consistent.