Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6803849
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:23:40+00:00 2026-05-26T19:23:40+00:00

I have XSD Schema with the following structure: ElementA has only one ElementB and

  • 0

I have XSD Schema with the following structure:
ElementA has only one ElementB and that has zero to infinite of ElementC

ElementA -> ElementB -> ElementC[]

When I generate classes with this schema and xsd.exe it generates multidimensional arrays: Everywhere ElementA is used it puts ElementC[][][]. For each depth one dimension. Is there way to stop xsd.exe doing this?

For example the XSD defines an element called carList that contains only the car-tags (zero to infinite “car”). The xsd.exe should then create a class called carList that contains only an one-dimensional array or an list of car. Instead wherever a carList would be used it puts an car[][]. Don’t like that.

One more question, is there a way to generate a XML that fits an given XSD besides generating classes that will be filled and serialized?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T19:23:40+00:00Added an answer on May 26, 2026 at 7:23 pm

    I use xsd.exe as well and I don’t know a better way, at least for .NET platform.

    After generating XSD schema file from XML, you need to modify the dimension ranges in XSD file then generate the Class. Because, dimensions in XML are unclear. You may have a single node at the moment but maybe you can add more in the future. Rules are not certain. Because of that reason, you need to edit XSD manually before generating the code files.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following xml which has xsd schema, but is poor and no
I have the following directory structure: schema1 schema1.xsd schema1.xsdconfig schema2 schema2.xsd schema2.xsdconfig schema3 schema3.xsd
Say you have the following in a schema: <xsd:complexType name=shape/> <xsd:complexType name=circle> <xsd:complexContent> <xsd:extension
I have one xsd file I'd rather not modify (Exceptions.xsd): <xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema xmlns=http://me.com/Exceptions.xsd targetNamespace=http://me.com/Exceptions.xsd
I have a an XSD that looks like this (roughly) <xs:schema id=Appointment targetNamespace=http://tempuri.org/Record.xsd elementFormDefault=qualified
I have the following xml schema: <?xml version=1.0 encoding=utf-8?> <xsd:schema xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xmlns:xs=http://www.w3.org/2001/XMLSchema xmlns:xsd=http://www.w3.org/2001/XMLSchema attributeFormDefault=unqualified
I use Hyperjaxb3 to generate JPA entities from XSD schema. I have a xsd:string
I have the following xsd files: SchemaA <?xml version=1.0 encoding=utf-8?> <xs:schema targetNamespace=http://schemaA elementFormDefault=qualified xmlns=http://schemaA
I have xml file whose structure is defined with following xsd: <?xml version=1.0 encoding=utf-8?>
I have an XSD schema with target namespace ns1 which defines the following type:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.