Rauland
Apr 14th, 2007, 01:03 PM
Hello,
I am trying to serialize a c# object to a XML document.
The thing is, it needs a "xsi:schemaLocation" attribute.
I am using the xmlSerializer.
I have tried;
1)
[XmlAttributeAttribute("schemaLocation")]
public string xsiSchemaLocation = "http:// bla bla, whatever.xsd"
also this
2)
[XmlAttributeAttribute("schemaLocation", namespace="somenamespace")]
public string xsiSchemaLocation = "http:// bla bla, whatever.xsd"
This gives me a good result, but for some reason
it returns, "d1p1:schemaLocation" instead of "xsi:schemaLocation" , also adds some extra information which I do not want.
Any help would be greatly appreciated,
Thanks,
Rauland
I am trying to serialize a c# object to a XML document.
The thing is, it needs a "xsi:schemaLocation" attribute.
I am using the xmlSerializer.
I have tried;
1)
[XmlAttributeAttribute("schemaLocation")]
public string xsiSchemaLocation = "http:// bla bla, whatever.xsd"
also this
2)
[XmlAttributeAttribute("schemaLocation", namespace="somenamespace")]
public string xsiSchemaLocation = "http:// bla bla, whatever.xsd"
This gives me a good result, but for some reason
it returns, "d1p1:schemaLocation" instead of "xsi:schemaLocation" , also adds some extra information which I do not want.
Any help would be greatly appreciated,
Thanks,
Rauland