Where is her name given like that? That looks like someone has just stacked all names they could find after each other. It is possible she has been called both Andersdotter and Ersson at different times, but not together, and as for "middle name" that is a concept that just didn't exist if she was born in Sweden.
If both Andersdotter and Ersson have been correct the story is probably that her father was an Anders Ersson, so she was Anders's daughter ("Andersdotter"), but later she (and maybe her siblings) started to treat their father's patronymic as an inherited family name and called themselves Ersson as well. That is possible, but to see if that is true in this case you have to follow these persons of course.