This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
It would be nice if there was the possibility to "reformat" XML text automatically. Let me explain: When you write java code it is possible to "reformat the code" that is the identation is added. Well a similar feature would be nice in XML so the XML file will automatically be indented ... For example: <tag1 name="SD" > <tag2 id="1">some text</tag2> </tag1 > Would be reformatted as: <tag1 name="SD"> <tag2 id="1">some text</tag2> </tag1>
General XML formatting requirements are not so simple as you request. But you are right it's pending task -> many duplicities. What is content-whitespace and what is indentation-whitespace?
*** This issue has been marked as a duplicate of 22510 ***
I think that in the first place the indent-ws feature is more needed. That is if a (xml) node is present in another node but no text node (filled with chars) is present between them then the indentation engine should indent the nodes. for example: <tag1 name="SD"> <tag2 id="1">some text</tag2> </tag1> Would be reformatted as: <tag1 name="SD"> <tag2 id="1">some text</tag2> </tag1> but the following example: <tag1 id="1">some text<tag2 name="SD"/>sosome other text</tag1> should be partially reformatted to: <tag1 id="1"> some text<tag2 name="SD"/>some other text </tag1>
The second one is problem as nobody gurantee that the WSes are indent-WSes. On the other hand it's not so common.
Verified duplicate