Cognize
asked on
Help required deserializing (C# / VB) an Xml File to an Object according to Schema - Where is shcema passed in?
Hi,
I have a bug where an xml file is deserializing, but is missing some info from the xml file.
The file validates against a schema. What I want to do is make sure that I'm giving the deserializer the correct schema.
The schema is not referenced in the xml files (given to me by a 3rd party)
Is there a way of pointing the deserializer to a local copy of the schema to see if that helps?
Thanks
I have a bug where an xml file is deserializing, but is missing some info from the xml file.
The file validates against a schema. What I want to do is make sure that I'm giving the deserializer the correct schema.
The schema is not referenced in the xml files (given to me by a 3rd party)
Is there a way of pointing the deserializer to a local copy of the schema to see if that helps?
Thanks
Public Sub SaveXMLFile(ByVal fileName As String, ByVal importObject As XMLImportObject)
Dim xmlLoader As New XmlSerializer(GetType(XMLImportObject))
Dim writer As New XmlTextWriter(fileName, System.Text.Encoding.UTF8)
writer.Formatting = Formatting.Indented
xmlLoader.Serialize(writer, importObject)
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER