Re: HOWTO Overcome missing namespace declaration in root node
From: Christoph Schittko [MVP] (christophdotnetINVALID_at_austin.rr.com)
Date: 04/22/04
- Next message: Christoph Schittko [MVP]: "Re: Getting the xml from the Request object"
- Previous message: Klaus H. Probst: "Re: Working with an Embedded XML File"
- In reply to: David B. Bitton: "HOWTO Overcome missing namespace declaration in root node"
- Next in thread: David B. Bitton: "Re: HOWTO Overcome missing namespace declaration in root node"
- Reply: David B. Bitton: "Re: HOWTO Overcome missing namespace declaration in root node"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 21 Apr 2004 23:44:50 -0500
David,
Can you post:
* The serialization class
* the tag of the root element, including all namespace definitions
* the line of code where you instantiate the XmlSerializer
-- Christoph Schittko [MVP] Software Architect, .NET Mentor "David B. Bitton" <david@codenoevil.com> wrote in message news:%23Je9uj6JEHA.2244@tk2msftngp13.phx.gbl... > I am having a problem deserializing XML when the root node is missing a > namespace declaration. My Type has an XmlTypeAttribute with a namespace > defined. If I attempt to deserialize the XML, I get the dreaded > > <elementname xmlns=''> was not expected > > exception. If I comment out the XmlTypeAttribute, it works just fine. Just > so you know, when I instantiate an instance of an XmlSerializer, I pass a > default namespace to the ctor. Unfortunately that doesn't seem to work. > > So, how can I get the XmlSerializer to accept XML that is missing namespace > declarations? > > -- > -- > > David B. Bitton > david@codenoevil.com > www.codenoevil.com > > Code Made Fresh DailyT > >
- Next message: Christoph Schittko [MVP]: "Re: Getting the xml from the Request object"
- Previous message: Klaus H. Probst: "Re: Working with an Embedded XML File"
- In reply to: David B. Bitton: "HOWTO Overcome missing namespace declaration in root node"
- Next in thread: David B. Bitton: "Re: HOWTO Overcome missing namespace declaration in root node"
- Reply: David B. Bitton: "Re: HOWTO Overcome missing namespace declaration in root node"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|