Closed sniarn closed 6 months ago
This is using Version 2.1.1107.0.
I have a feeling that this is a namespace issue. When opening the XML file in VS, I get the following errors:
The element 'eu-backbone' in namespace 'http://europa.eu.int' has invalid child element 'eu-envelope'. List of possible elements expected: 'eu-envelope' in namespace 'uri:'.
The generated XSD contains xmlns="uri:"
which looks weird.
Thanks for replying.
We ended up manually adjusting the namespaces in the generated output files and got it working that way, so it is indeed a namespace issue. We don't see a need to re-generate the schema all that often, if at all, so we've settled on this as a solution that works for us. I might try the Perl script if I get some free time this week.
Hi,
Firstly, let it be known that I'm not knowledgeable when it comes to the more technical sides of XML so there's a good chance this is just user error.
I'm having an issue where deserializing produces an empty object (properties are
null
and collections are empty). I use the following procedure to generate the C# classes:eu-regional.xml
file and selecting the command XML > Create Schema. It is my understanding that Visual Studio will also use the referenced DTD files to perform this operation. Three XSD files are produced by this:eu-regional.xsd
,eu-regional1.xsd
, andeu-regional2.xsd
.xscgen
like below:I'm then parsing the XML file using the code below, but an "empty" object is returned. There is no error.
Anyone have an idea what the problem is?
Thanks.