After having created many files already, I changed my Eclipse configuration to use spaces instead of tabs. It works: new things I write use spaces. But files I wrote yesterday still have tabs, of course. I want to convert them from tabs to spaces.
For Java files it is easy: Open file, press CTRL+a, press CTRL+i, done.
But how to do so for XML files? Unlike Java, with XML files CTRL+a/CTRL+i not only converts tabs but also tries to "improve formatting", which wrecks things:
Initial code:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<beans>
<bean id="webscript.helloworld.get"
class="com.example.HelloWorldWebScript"
parent="webscript">
</bean>
</beans>
After CTRL+a/CTRL+i (or CTRL+SHIFT+f):
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
license agreements. See the NOTICE file distributed with this work for additional
information regarding copyright ownership. The ASF licenses this file to
You under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of
the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
by applicable law or agreed to in writing, software distributed under the
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
OF ANY KIND, either express or implied. See the License for the specific
language governing permissions and limitations under the License. -->
<beans>
<bean id="webscript.helloworld.get" class="com.example.HelloWorldWebScript"
parent="webscript">
</bean>
</beans>
QUESTION: For an XML file in Eclipse, how to convert tabs to spaces, with no other changes?