Alex wrote:
Do I have to do anything special besides place public fields in my root
serialization object and apply XmlAttribute to them? It doesn't seem to
work, I get reflection error, trying to do typeof(SerializtionObj)
Here is a sample how to control schemaLocation attribute, I hope it helps:
public class Test {
[XmlAttribute("schemaLocation",
Namespace="http://www.w3.org/2001/XMLSchema-instance")]
public string schemaLocation;
static void Main(string[] args) {
XmlSerializer ser = new XmlSerializer(typeof(Test));
Test t = new Test();
t.schemaLocation = "foo.xsd";
ser.Serialize(Console.Out, t);
}
}
--
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel