7 Replies - 917 Views - Last Post: 26 November 2014 - 03:02 PM Rate Topic: -----

#1 bonkerspr   User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 98
  • Joined: 05-December 08

How to create c# classes with XSD. its giving me and error

Posted 25 November 2014 - 08:43 AM

Hello, we are trying to create c# clases from xsd schema but it giving and error.

Please see attached picture.

The error list is bigger but we take on picture only fee lasts lines.

We are using Visual Studio 10 xsd.exe and we are typing: xsd.exe schema_file_name.xsd /c

ANy one have an idea in order to solve it ?
Is This A Good Question/Topic? 0
  • +

Replies To: How to create c# classes with XSD. its giving me and error

#2 Curtis Rutland   User is offline

  • (╯□)╯︵ (~ .o.)~
  • member icon


Reputation: 5106
  • View blog
  • Posts: 9,283
  • Joined: 08-June 10

Re: How to create c# classes with XSD. its giving me and error

Posted 25 November 2014 - 08:56 AM

You did not attach a picture.

Please copy and paste the relevant error lines here (not as an image, but as text). If it's much too big, you can use use either Pastebin or Gist. But either way, text is better than a picture.

For general questions about XSD.exe, see the MSDN page: http://msdn.microsof...=vs.110%29.aspx
Was This Post Helpful? 0
  • +
  • -

#3 bonkerspr   User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 98
  • Joined: 05-December 08

Re: How to create c# classes with XSD. its giving me and error

Posted 25 November 2014 - 09:03 AM

I am sorry.

Here is the image:

http://postimg.org/image/5ouapr24j/
Was This Post Helpful? 0
  • +
  • -

#4 bonkerspr   User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 98
  • Joined: 05-December 08

Re: How to create c# classes with XSD. its giving me and error

Posted 25 November 2014 - 09:30 AM

Any comments ?
Was This Post Helpful? 0
  • +
  • -

#5 Curtis Rutland   User is offline

  • (╯□)╯︵ (~ .o.)~
  • member icon


Reputation: 5106
  • View blog
  • Posts: 9,283
  • Joined: 08-June 10

Re: How to create c# classes with XSD. its giving me and error

Posted 25 November 2014 - 09:40 AM

Well, first don't bump threads that fast; we're an all-volunteer forum and you're already the current top thread.

As to the error itself: it means your XSD schema is invalid and must be fixed before you can generate classes from it.

Edit: the error message itself tells you what's wrong: you have elements in the XSD that are not declared. Try searching the error message (minus the actual name of the elements) to help figure out how to declare the elements properly.
Was This Post Helpful? 0
  • +
  • -

#6 bonkerspr   User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 98
  • Joined: 05-December 08

Re: How to create c# classes with XSD. its giving me and error

Posted 25 November 2014 - 11:10 AM

Is not invalid. Is a XSD schema from a very trusted source (company).

The problem is that uses DDEX standarts.
Was This Post Helpful? 0
  • +
  • -

#7 Curtis Rutland   User is offline

  • (╯□)╯︵ (~ .o.)~
  • member icon


Reputation: 5106
  • View blog
  • Posts: 9,283
  • Joined: 08-June 10

Re: How to create c# classes with XSD. its giving me and error

Posted 25 November 2014 - 12:05 PM

Is this schema private or is it something you could post here, so others could look at it and see what the problem might be? Without that, it's going to be hit-or-miss.

The error is saying that some elements are not declared. If these are declared in another schema file or location then that schema would have to be included as well.

I also took a look at the urls provided in the screenshot, apparently they link to this schema here: http://ddex.net/xml/20100712/ddex. That does seem to have those values declared.
Was This Post Helpful? 0
  • +
  • -

#8 bonkerspr   User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 98
  • Joined: 05-December 08

Re: How to create c# classes with XSD. its giving me and error

Posted 26 November 2014 - 03:02 PM

Hello, this is the schemas that we are trying to make serializable c# classes.

http://www.ddex.net/...ERNM-32-XSD.zip

You can download it there.

We are trying to xsd.exe filanema.xsd /c but give errors.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1