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 117610 - Unable to format XML file correctly
Summary: Unable to format XML file correctly
Status: VERIFIED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Text-Edit (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Sonali Kochar
URL:
Keywords:
Depends on: 126040
Blocks:
  Show dependency tree
 
Reported: 2007-10-03 12:47 UTC by dbryant
Modified: 2008-02-26 22:28 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dbryant 2007-10-03 12:47:08 UTC
Hi,

The xml editor in the version 6.0 Beta 1 (Build 200709141330) does not appear to format (pretty print) xml code e.g. the
following code in my web.xml file will not format:

<filter>
        <filter-name>DWRSecurityFilter</filter-name>
        <filter-class>com.xxx.security.DWRSecurityFilter</filter-class>
    </filter>
<filter-mapping>
        <filter-name>DWRSecurityFilter</filter-name>
        <url-pattern>/dwr/exec/*</url-pattern>
    </filter-mapping>
Comment 1 amitksaha 2007-10-12 16:49:04 UTC
Hi!
I would like to have some background information on this issue, so that I may try my hand at working on its resolution.

Thanks,
Amit
Comment 2 Samaresh Panda 2007-10-12 22:00:23 UTC
System Info:
  Product Version         = NetBeans IDE Dev (Build 071012)
  Operating System        = Windows Vista version 6.0 running on x86
  Java; VM; Vendor        = 1.6.0_01; Java HotSpot(TM) Client VM 1.6.0_01-b06; Sun Microsystems Inc.

Works fine. Try with a fresh userdir.
Comment 3 tonybeckham 2007-10-12 23:20:27 UTC
Product Version: NetBeans IDE Dev (Build 200710120000)
Java: 1.5.0_07; Java HotSpot(TM) Client VM 1.5.0_07-87
System: Mac OS X version 10.4.10 running on i386; MacRoman; en_US (nb)

If I paste the code into a new xml document then format the code, reformatting works.
Comment 4 Samaresh Panda 2008-02-20 04:58:19 UTC
Fix integrated: http://hg.netbeans.org/main?cmd=changeset;node=cdad61b5b4a8.
There is a new formatter in place. Please check with a new build.
Comment 5 tonybeckham 2008-02-26 22:28:11 UTC
Fix Verified
Code snippet from this issue as well as tinkering with malformed code then formatting works and is pretty.

Product Version: NetBeans IDE Dev (Build 200802251204)
Java: 1.5.0_13; Java HotSpot(TM) Client VM 1.5.0_13-119
System: Mac OS X version 10.5.2 running on i386; MacRoman; en_US (nb)