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 7561163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T13:05:46+00:00 2026-05-30T13:05:46+00:00

I have an XSD file including some patterns and need to create a bunch

  • 0

I have an XSD file including some patterns and need to create a bunch of XML documents for testing matching this schema. I know there are some tools and frameworks out there like xsd.exe, JAXB, etc. which create classes out of the XSD.

Basically I need to do the following steps:

  • Load XSD
  • Parse XSD
  • Create matching XML document

Example:

<xs:simpleType name="typeName">
  <xs:restriction base="xs:string">
    <xs:pattern value="[A-ZÄÖÜß][A-ZÄÖÜß'/\-.+ ]*"/>
    <xs:pattern value="+[ ]*"/>
  </xs:restriction>
</xs:simpleType>

What would be a standard way doing this? The point is that all this shall happen at runtime, i.e. not creating classes via xsd.exe or else. Preferrably in C# or Java but any language is welcome.

  • 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-30T13:05:47+00:00Added an answer on May 30, 2026 at 1:05 pm

    Microsoft has something called the XmlSampleGenerator. Check this out:

    http://msdn.microsoft.com/en-us/library/aa302296.aspx

    here are it’s limitations:

    • The W3C XML Schema Identity Constraints (xs:key, xs:keyref,
      xs:unique) are not supported while generating an instance document.
    • If xs:pattern facets exist on simple types, values generated may not
      conform to the pattern.
    • Enumerations of the xs:QName type may not
      work as expected since this requires the prefixes in the schema to be
      preserved.
    • xs:ENTITY, xs:ENTITIES, and xs:NOTATION types are not
      supported.
    • xs:base64Binary content is generated only if enumerations
      exist in the schema for that type.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some XML and an XML Schema in a local xsd file. The
Whenever I have needed to create a class file from an XML XSD schema,
I have an XML file that I used to create an XSD File and
I have an XML Schema Definition file .XSD who's elements are in Spanish. I
I am new to xml's. I have used xsd.exe to create a .xsd file
I have this code to validate an XML file against an XSD file: $file
I have xsd file. I want to generate my entity model from this schema
I have an XSD file and I want to create an XML file at
I have an XSD file which contains the schema for my XML. The XSD
I have one xsd file ,I used xmlpad to validate this xsd against xml

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.