[Mono-bugs] [Bug 466423] New: XDocument fails to Save() / Store the name-space prefixes of documents loaded with XDocument.Load()

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Jan 15 09:39:41 EST 2009


https://bugzilla.novell.com/show_bug.cgi?id=466423


           Summary: XDocument fails to Save() / Store the name-space
                    prefixes of documents loaded with XDocument.Load()
    Classification: Mono
           Product: Mono: Class Libraries
           Version: unspecified
          Platform: x86-64
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.XML
        AssignedTo: atsushi at ximian.com
        ReportedBy: dans at houmus.org
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1b2)
Gecko/20081201 Firefox/3.1b2 (.NET CLR 3.5.30729)

If you follow the steps to reproduce... you will see that the document changes
consierably from zzz.xml -> xxx.xml

Essentially... All namespace prefixes are "deleted" and an additional top-level
xmlns that was never included in the document is "added"..



Reproducible: Always

Steps to Reproduce:
Can be seen with the interactive csharp-interpreter:
---------------------------------------------------------------
$ cat zzz.xml
<?xml version="1.0" encoding="utf-8" ?>

<xxx:a xmlns:xxx="http://www.foobar.com/a/b/c/d/e/f/g/h">
  <xxx:b>
        blah blah blah
  </xxx:b>
</xxx:a>
---------------------------------------------------------------

csharp -reference:System.Xml.Linq
csharp> using System.Xml.Linq;
csharp> var x = XDocument.Load("config/channels-historical-radez.xml");
csharp> x.Save("xxx.xml");
csharp>

---------------------------------------------------------------
$ cat xxx.xml
<?xml version="1.0" encoding="utf-8"?><a
xmlns:xxx="http://www.foobar.com/a/b/c/d/e/f/g/h"
xmlns="http://www.foobar.com/a/b/c/d/e/f/g/h"><b>
        blah blah blah
  </b></a>
---------------------------------------------------------------

-- 
Configure bugmail: https://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