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.
|Summary:||XML reformat source file|
|Issue Type:||ENHANCEMENT||Exception Reporter:|
|Bug Depends on:||31726|
Description miks 2003-03-05 22:03:39 UTC
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>
Comment 1 _ pkuzel 2003-03-06 09:57:26 UTC
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?
Comment 2 _ pkuzel 2003-03-06 11:05:47 UTC
*** This issue has been marked as a duplicate of 22510 ***
Comment 3 miks 2003-03-06 21:46:11 UTC
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>
Comment 4 _ pkuzel 2003-03-10 11:22:16 UTC
The second one is problem as nobody gurantee that the WSes are indent-WSes. On the other hand it's not so common.
Comment 5 Mikhail Matveev 2007-11-23 16:49:05 UTC