[Mono-devel-list] Fix for System.Xml.XmlDocument CreateAttribute

Jonathan Hogg jonathan at onegoodidea.com
Wed Sep 10 12:19:36 EDT 2003

Hi all,

Enclosed is a patch for System.Xml.XmlDocument that changes CreateAttribute
to set the namespaces automatically when creating attributes of the form
'xmlns', 'xmlns:*' and 'xml:*'.

This appears to be the behaviour of MS.NET (at least my app that runs on
.NET fails on Mono). However, it might be worth checking this before doing
anything with it.

[The actual problem I had was doing a SetAttribute() on an XmlElement with
"xmlns:...". This was complaining that it wouldn't accept the attribute
without the namespace being correctly set. I looked at the code a bit and
decided that the creation of the attribute node looked like the most likely
suspect for being wrong.]


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/octet-stream
Size: 1067 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20030910/92c816ca/attachment.obj 

More information about the Mono-devel-list mailing list