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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T02:15:08+00:00 2026-05-11T02:15:08+00:00

I have an XML form with an element 0, which is well-formed but not

  • 0

I have an XML form with an element 0, which is well-formed but not valid. When I try to validate it XMLSpy I get a following error: Nothing is allowed inside empty element ‘hidden’. Below is my schema:

<xs:element name='hidden'>     <xs:complexType>         <xs:attribute name='datatype' type='xs:string' use='optional'/>         <xs:attribute name='alias' type='xs:string' use='optional'/>         <xs:attribute name='source' type='xs:string' use='optional'/>         <xs:attribute name='name' type='xs:string' use='required'/>         <xs:attribute name='lookup' type='xs:string' use='optional'/>     </xs:complexType> </xs:element> 

What do I need to add to the above schema to fix this error? Thanx ml

  • 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. 2026-05-11T02:15:09+00:00Added an answer on May 11, 2026 at 2:15 am

    As welbog noted, you defined a complex empty element. Assuming you want only text within the hidden tag, you could write a schema along theses lines :

    <xs:element name='hidden'>   <xs:complexType>     <xs:simpleContent>       <xs:extension base='xs:integer'>         <xs:attribute name='datatype' type='xs:string' use='optional'/>         <xs:attribute name='alias'    type='xs:string' use='optional'/>         <xs:attribute name='source'   type='xs:string' use='optional'/>         <xs:attribute name='name'     type='xs:string' use='required'/>         <xs:attribute name='lookup'   type='xs:string' use='optional'/>       </xs:extension>     </xs:simpleContent>   </xs:complexType> </xs:element> 

    This way, you can have a piece of XML like this one:

    <hidden datatype='foo' name='bar'>0</hidden> 

    What is going on here is that I defined ‘hidden’ to be an extension of xs:integer (by the way, you can make it extends any type you want), which means that ‘hidden’ elements are like integers element, but with additional constraints, or in this case with additional attributes.

    • 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 which can appear in either form in my XML
I have an xml in following form: <?xml version=1.0 encoding=UTF-8?> <query> <queryParams name=accountID>Star TV</queryParams>
Picture the following situation. I have an XML document as follows, <Form> <Control Type=Text
Im using c# .net , windows form application. I have a XML file which
I have a .xslt that translates xml from one form to another (I'm not
I have the following XML file with page nodes which I want to read
I have an XElement variable named content which consists of the following XML: <content>
I have the standard XML form and am having problems removing an element. XML
I am generating a rss(xml) output form a php file. I have got a
I currently have a datasource from a client in the form of XML, this

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.