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 188422

Summary: XMLModel.removeChildNodes does not fix up whitespace
Product: xml Reporter: Jesse Glick <jglick>
Component: XDMAssignee: Svata Dedic <sdedic>
Status: RESOLVED WONTFIX    
Severity: normal    
Priority: P3    
Version: 6.x   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Attachments: Suggested impl assuming plain old DOM

Description Jesse Glick 2010-07-06 20:56:10 UTC
Created attachment 100631 [details]
Suggested impl assuming plain old DOM

Assume an XDMModel on which has been called setPretty(true) and setIndentation("    "). If you start with

<root/>

and use insertBefore to add a child, it is correctly rendered as

<root>
    <child/>
</root>

But if you now call removeChildNodes to delete that child, you get

<root>
    <!--(end of line)-->
</root>

rather than

<root/>

again as expected. These should be inverse operations.
Comment 1 Sergey Lunegov 2010-07-07 08:39:58 UTC
Nikita, please take a look.
Comment 2 Martin Balin 2015-09-17 13:16:55 UTC
Report from old NetBeans version. Due to code changes since it was reported likely not reproducible now. Feel free to reopen if happens in 8.0.2 or 8.1.