468,107 Members | 1,319 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,107 developers. It's quick & easy.

How to add xsi:schemaLocation to serialized c# class

Hi all,

I'm getting really confused how to solve this.

I've got this class generated from XSD with xsd (from visual studio
2005)

namespace gpx {
using System.Xml.Serialization;

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xs d",
"2.0.50727.42")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("c ode")]

[System.Xml.Serialization.XmlTypeAttribute(Namespac e="http://www.topografix.com/GPX/1/1")]
[System.Xml.Serialization.XmlRootAttribute("gpx",
Namespace="http://www.topografix.com/GPX/1/1", IsNullable=false)]

.... etc etc etc...
I'd like to see in the output an attribute of the root element
xsi:schemaLocation="http://www.topografix.com/GPX/1/1
http://www.topografix.com/GPX/1/1/gpx.xsd"

What do i have to modify in the generated class so that the
schemaLocation attribute appears in the generated XML file?

Thanks,
Harmen

Jan 18 '07 #1
0 5631

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Sarah Tegtmeier | last post: by
reply views Thread by Ron James | last post: by
reply views Thread by kolja2003 | last post: by
2 posts views Thread by grochmal | last post: by
1 post views Thread by Solo | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.