[Mono-list] Questions about writing an XML document

Loren Bandiera lorenb at mmgsecurity.com
Tue May 9 08:11:35 EDT 2006


> Hello,
>
> Hmm, it is a bug in XmlAttribute (it appears when xmlDoc.Save(blah) is
> added). I made a simple fix which will soon go into svn.

Great!

> As a workaround, you can use XmlElement.SetAttribute("xsi",
> "schemaLocation", XmlSchema.InstanceNamespace).
>
> Atsushi Eno
>

I tried out the workaround and it no longer throws an exception. The XML I
get looks like this:

<?xml version="1.0"?>
<doc xmlns="http://whatever.org/XMLSchema/foo"
d1p1:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:d1p1="schemaLocation">
  <foo />
</doc>

That should for now. Although I'm not sure what the 'd1p1' part is coming
from. That's just part of the workaround I guess?

Thanks for your help!

-- 
Loren Bandiera, CISSP <lorenb at mmgsecurity.com>
MMG Security, Inc.




More information about the Mono-list mailing list