You can change the Content types and Associated editors
Under Windows tab in your Eclipse editor, Click:
Preferences -> General -> Content Types & Associated editors
You can also manually change formatting options for XML files under
Under Windows tab in your Eclipse editor, Click:
Preferences -> XML -> XML Files -> Editor
I'm using Eclipse Version: 2024-06 (4.32.0), Build id: 20240606-1231