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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T11:58:05+00:00 2026-06-14T11:58:05+00:00

I want to write an XML file that contains a root node called appointment_list

  • 0

I want to write an XML file that contains a root node called appointment_list. This root node should contain multiple child elements of type appointment_type.

I’ve written the schema below but I get the error:

s4s-elt-must-match.1: The content of ‘appointments_list’ must match
(annotation?, (simpleType | complexType)?, (unique | key | keyref)*)).
A problem was found starting at: element.

I know that I’m supposed to use one of the tokens it lists in the message but I don’t know which one. I’m new to XML. What I want is that the appointment_list root element contain multiple child appointment_type elements. How do I do that. Thanks 🙂

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs= "http://www.w3.org/2001/XMLSchema">

    <xs:simpleType name="priority">
        <xs:restriction base="xs:string">
            <xs:enumeration value="high"/>
            <xs:enumeration value="normal"/>
            <xs:enumeration value="low"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:complexType name="appointment_type">
        <xs:sequence>
            <xs:element name="title" type="xs:string" minOccurs="1" />
            <xs:element name="description" type="xs:string" minOccurs="0"/>
            <xs:element name="appointment_date" type="xs:date" minOccurs="1"/>
            <xs:element name="appointment_time" type="xs:time" minOccurs="1"/>
            <xs:element name="appointment_priority" type="priority" minOccurs="0"/>
            <xs:element name="duration" minOccurs="0">
                <xs:simpleType>
                    <xs:restriction base="xs:integer">
                        <xs:minInclusive value="0"/>
                        <xs:maxInclusive value="24"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:element>
        </xs:sequence>
        <xs:attribute name="id" type="xs:positiveInteger" use="required"/>
    </xs:complexType>   

    <xs:element name="appointments_list">
            <xs:element name="appointment" type="appointment_type" maxOccurs="unbounded" />
    </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-06-14T11:58:06+00:00Added an answer on June 14, 2026 at 11:58 am

    An <xs:element> that contains elements must have a <xs:complexType> (or type attribute whose value is a complex type – like your <appointment> element).

    A <xs:complexType> must have a group, e.g. <xs:sequence>.

    <xs:element name="appointments_list">
      <xs:complexType>   
        <xs:sequence>   
          <xs:element name="appointment" type="appointment_type" maxOccurs="unbounded" />
        </xs:sequence>   
      </xs:complexType>   
    </xs:element>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have file called data_out.xml which contains this xml code: <?xml version=1.0 ?> -
I want to write a XML file as below: <?xml version=1.0 encoding=UTF-8?> <books xmlns:xsd=http://www.w3.org/2001/XMLSchema
I want to write a .xml file using the following code into the App_Data/posts.
I want to write a xml file with C#. It is a basic file
I want to write the bulk of data into xml file ,the data coming
I want to write a string to a key in an xml file and
I want to write an application that takes an XML-schema as input and has
I have a string which has an xml inside. I want to write this
I have a problem. I have an XML file that contains information about 100
I'm using Linq to write XML to a file and I want only sections

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.