Fixed bugs with XMLReader

Does not support comments yet