KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
How can I add the following xsi:schemaLocation to a serialized class? <ern:NewReleaseMessage xmlns:ern="http://ddex.net/xml/2010/ern-main/32" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" LanguageAndScriptCode="en" xsi:schemaLocation="http://ddex.net/xml/2010/ern-main/32 http://ddex.net/xml/2010/ern-main/32/ern-main.xsd" MessageSchemaVersionId="2010/ern-main/32"> Here is what I have done so far: public class NewReleaseMessage { [XmlAttribute] public string LanguageAndScriptCode { get; set; } [XmlAttribute("schemaLocation", Namespace = "http://ddex.net/xml/2010/ern-main/32")] public string schemaLocation = "http://ddex.net/xml/2010/ern-main/32 http://ddex.net/xml/2010/ern-main/32/ern-main.xsd"; [XmlAttribute] public string MessageSchemaVersionId { get; set; } [XmlElement()] public MessageHeader MessageHeader { get; set; } } When I deserialize the xml to the object in VS I get: {"The method or operation is not implemented." There is an error in XML document (5, 44) - This actually points to the line: xsi:schemaLocation="http://ddex.net/xml/2010/ern-main/32 http://ddex.net/xml/2010/ern-main/32/ern-main.xsd "
Tags (comma-separated)
Save Edits
Cancel