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

cc @ParfaitG if you can have a look here thanks @stephan-hesselmann-by for the patch and @ParfaitG for the review! @meeseeksdev backport 1.3.x Something went wrong ... Please have  a look at my logs.