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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:43:10+00:00 2026-05-26T03:43:10+00:00

I am trying to learn XML, and I have come up with a schema

  • 0

I am trying to learn XML, and I have come up with a schema and sample file example to see if I know what I’m doing before I get to far.

.xsd file

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:element name="Assumption" type="assumptionType"/>
    <xsd:complexType name="assumptionType">
        <xsd:sequence>
            <xsd:element name="entries" type="entriesType"/>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="entriesType">
        <xsd:sequence>
            <xsd:element name="entry">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="x" type="xsd:decimal"/>
                        <xsd:element name="y" type="xsd:decimal"/>
                        <xsd:element name="value" type="xsd:decimal"/>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>
        </xsd:sequence>
    </xsd:complexType>
</xsd:schema>

.xml file

<?xml version="1.0" encoding="UTF-8"?>
<Assumption>
    <entries>
        <entry>
            <x>12</x>
            <y>14</y>
            <value>16</value>
        </entry>
        <entry>
            <x>12</x>
            <y>24</y>
            <value>5</value>
        </entry>
    </entries>
</Assumption>

I am using this tool to try to validate the .xml against the .xsd. I am getting the following error:

The following errors were found: 
TYPE              LOC       MESSAGE 
Validation        9, 10     cvc-complex-type.2.4.d: Invalid content was found starting
                            with element 'entry'. No child element is expected at this point

I’m obviously not understanding something.

  • 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-26T03:43:11+00:00Added an answer on May 26, 2026 at 3:43 am

    Since entry is multiple node, you need to specify maxOccurs="unbounded"

    Your XSD would be:-

    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
        <xsd:element name="Assumption" type="assumptionType"/>
        <xsd:complexType name="assumptionType">
            <xsd:sequence>
                <xsd:element name="entries" type="entriesType"/>
            </xsd:sequence>
        </xsd:complexType>
        <xsd:complexType name="entriesType">
            <xsd:sequence>
                <xsd:element name="entry" maxOccurs="unbounded">
                    <xsd:complexType>
                        <xsd:sequence>
                            <xsd:element name="x" type="xsd:decimal"/>
                            <xsd:element name="y" type="xsd:decimal"/>
                            <xsd:element name="value" type="xsd:decimal"/>
                        </xsd:sequence>
                    </xsd:complexType>
                </xsd:element>
            </xsd:sequence>
        </xsd:complexType>
    </xsd:schema>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to learn XML and I know this is a problem with
I'm trying to learn LINQ and have a question on querying XML using VB.
I am trying to learn how to bind the following simple XML file to
I am trying to learn deserialization. I have written this code to deserialize *.hbm.xml
Trying to learn about php's arrays today. I have a set of arrays like
Trying to learn MVP pattern with C#... Does anyone know of any particularly good
In trying to learn how to create objects in ActionScript, I have had no
I am trying to learn the Apache Struts framework and I have written a
I am trying to learn XSLT but I work best by example. I want
I am trying to learn how to search XML trees with LINQ using VB.net.

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.