BUG: `to_xml` with `index=False` and offset input index
Fixes #42458

It was assumed that the index contains the element `0`. This led to a
defect when the index of the input Dataframe has an offset, which is a
common use case when streaming Dataframes via generators.

This fix consists of not relying on accessing the `0` element of
`frame_dicts`.

- [x] closes #42458 
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [x] whatsnew entry
