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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:30:52+00:00 2026-05-26T04:30:52+00:00

I am getting a validation error from the following XSD: <?xml version=1.0 ?> <xsd:schema

  • 0

I am getting a validation error from the following XSD:

<?xml version="1.0" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <xsd:element name="People">
      <xsd:complexType>
         <xsd:sequence>
            <xsd:element name="Person" maxOccurs="unbounded">
                 <xsd:complexType>
                    <xsd:attribute name="name" type="xsd:string" use="required" />
                 </xsd:complexType>
             </xsd:element>
         </xsd:sequence>
      </xsd:complexType>
   </xsd:element>
</xsd:schema>

when using the following XML to validate:

<?xml version="1.0" ?>
<People>
    <Person name='john'>
        a nice person
    </Person>
    <Person name='sarah'>
        a very nice person
    </Person>
    <Person name='chris'>
        the nicest person in the world
   </Person>
</People>

Returns the following error:

lxml.etree.XMLSyntaxError: Element 'Person': Character content is not allowed, because the content type is empty.

What am I missing?

  • 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-26T04:30:53+00:00Added an answer on May 26, 2026 at 4:30 am

    It’s saying that the “Person” cannot include a string. For the xml to validate with that xsd use this :

    <?xml version="1.0" ?>
    <People>
        <Person name='john'>
        </Person>
        <Person name='sarah'>
        </Person>
        <Person name='chris'>
       </Person>
    </People>
    

    Try this for the xsd for validation :

    <?xml version="1.0" ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
       <xsd:element name="People">
          <xsd:complexType>
             <xsd:sequence>
             <xsd:element name="Person" type="Person" maxOccurs="unbounded"/>
             </xsd:sequence>
          </xsd:complexType>
       </xsd:element>
    
       <xsd:complexType name="Person">
         <xsd:simpleContent>
            <xsd:extension base="xsd:string">
               <xsd:attribute name="name" type="xsd:string" use="required" />
            </xsd:extension>
        </xsd:simpleContent>
       </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 have the following xml file <Layout xmlns=http://tempuri.org/Layout/> <Numeric Id=temperature Caption=Temperature> <validation:IsValidWhen xmlns:validation=http://tempuri.org/Validation/> </validation:IsValidWhen>
I am getting this error while following the tutorial from railstutorial.org. Model class :
While validating my CSS on http://jigsaw.w3.org/css-validator/ I am getting following errors: 1.Property zoom doesn't
Getting the subdomain from a URL sounds easy at first. http://www.domain.example Scan for the
I am getting the following error when I post back a page from the
I am using asp.net mvc 3 and I keep getting the following error. Validation
I'm getting the following error while validating an xml document while using IXMLDOMDocument2 (C++):
I'm getting this error: The remote certificate is invalid according to the validation procedure.
I'm following the provided instructions but is not working. I'm getting this error: INFO:
I've been getting a validation of viewstate error for a long time on my

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.