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

  • Home
  • SEARCH
  • 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 696685
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T03:05:20+00:00 2026-05-14T03:05:20+00:00

I need to create program that creates a XML schema like below using System.Xml.XmlSchema

  • 0

I need to create program that creates a XML schema like below using System.Xml.XmlSchema namespace

I’m using the XmlSchemaComplexType to MyString and MyInteger but I can’t seem to find a way to set the extension to base string and int respectively.

Any guidance is much appreciated … thanks

<?xml version="1.0" encoding="utf-8" ?>
<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:complexType name="MyString">
        <xs:simpleContent>
            <xs:extension base="xs:string">
                <xs:attribute name="modified" type="xs:boolean" />
            </xs:extension>
        </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="MyInteger">
        <xs:simpleContent>
            <xs:extension base="xs:int">
                <xs:attribute name="modified" type="xs:boolean" />
            </xs:extension>
        </xs:simpleContent>
    </xs:complexType>
    <xs:element name="data">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="row">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="order_id" type="MyInteger" />
                            <xs:element name="order_status" type="MyString" />
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
</xs:schema>
  • 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-14T03:05:21+00:00Added an answer on May 14, 2026 at 3:05 am

    I believe something like this should do the trick:

    // <xs:simpleContent>
    XmlSchemaSimpleContent simpleContent = new XmlSchemaSimpleContent();
    
    // <xs:extension base="xs:string">
    XmlSchemaSimpleContentExtension simpleContent_extension =
        new XmlSchemaSimpleContentExtension();
    
    simpleContent_extension.BaseTypeName =
        new XmlQualifiedName("string", "http://www.w3.org/2001/XMLSchema");
    

    See the example at the bottom of this page for context.

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

Sidebar

Ask A Question

Stats

  • Questions 537k
  • Answers 537k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The 2nd template parameter of std::set expects a type, not… May 17, 2026 at 1:43 am
  • Editorial Team
    Editorial Team added an answer If you're running Firefox, maybe this is the issue you're… May 17, 2026 at 1:43 am
  • Editorial Team
    Editorial Team added an answer the problem is if I do not mark UserService as… May 17, 2026 at 1:43 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have a XML schema that I will need to create Java classes for.
I have a program that reads an XML file (for now, on local computer.)
I am putting an XSL together than will create a NAnt build script using
The scope of XML and DOM in .NET 3.5 is so large that I'm
I have a problem that I really need solved in any way (changing data
My company has decided that we need a generic demo infrastructure for our technology
I would like to write a C++ function, on Microsoft Windows, that spawns a
I want to test (true or false) whether an arbitrary XML file matches a
I have code written that converts my Document to a string prior to printing
Continuing from my last question , I'd like to know how can I bind

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.