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.

Bug 31708 - XML reformat source file
Summary: XML reformat source file
Status: VERIFIED DUPLICATE of bug 22510
Alias: None
Product: xml
Classification: Unclassified
Component: Text-Edit (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: issues@xml
Depends on: 31726
  Show dependency tree
Reported: 2003-03-05 22:03 UTC by miks
Modified: 2007-11-23 16:49 UTC (History)
0 users

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
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>
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 
for example:
<tag1 name="SD">
<tag2 id="1">some text</tag2>
Would be reformatted as:
<tag1 name="SD">
  <tag2 id="1">some text</tag2>
but the following example:
<tag1 id="1">some text<tag2 name="SD"/>sosome other 
should be partially reformatted to:
<tag1 id="1">
  some text<tag2 name="SD"/>some other text
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
Verified duplicate