[Mono-bugs] [Bug 592435] New: mono's XElement.ReplaceNodes() different behavior compared to .NET

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Mar 30 16:06:30 EDT 2010


http://bugzilla.novell.com/show_bug.cgi?id=592435

http://bugzilla.novell.com/show_bug.cgi?id=592435#c0


           Summary: mono's XElement.ReplaceNodes() different behavior
                    compared to .NET
    Classification: Mono
           Product: Mono: Class Libraries
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.XML
        AssignedTo: atsushi at ximian.com
        ReportedBy: tom_hindle at sil.org
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Created an attachment (id=351523)
 --> (http://bugzilla.novell.com/attachment.cgi?id=351523)
Test case showing difference with XElement.RepalceNodes

User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.3a4pre)
Gecko/20100322 Minefield/3.7a4pre

Using ReplaceNodes to replace existing nodes with all the Sub-SubNodes doesn't
seem to work like .NET.

IE doing this doesn't give expected results:
XElement root = ....
var elements = root.Elements().Elements();


Attaching Test case.


Reproducible: Always

Steps to Reproduce:
1.
2.
3.
Actual Results:  
<rt>
  <Name>
    <AUni ws="en">MyName</AUni>
    <AUni ws="en">MyName</AUni>
  </Name>
  <Description>
    <objsur t="o" guid="C83E33DD-2A79-4A4B-84F6-92343C4F5324" />
  </Description>
  <AUni ws="en">MyName</AUni>
  <AUni ws="en">MyName</AUni>
  <objsur t="o" guid="C83E33DD-2A79-4A4B-84F6-92343C4F5324" />
</rt>

Expected Results:  
<rt>
  <Name>
    <AUni ws="en">MyName</AUni>
    <AUni ws="en">MyName</AUni>
  </Name>
  <Description>
    <objsur t="o" guid="C83E33DD-2A79-4A4B-84F6-92343C4F5324" />
  </Description>
</rt>

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list