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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T05:02:05+00:00 2026-05-18T05:02:05+00:00

I started learning XML yesterday but I cant get around the concept of DTD.

  • 0

I started learning XML yesterday but I cant get around the concept of DTD.

My thinking is that, this will cause an error since my picture tag contains a whitespace character and I explicitly mention in my DTD that this should contain only EMPTY element.

As per my understanding, empty element does not contain any character at all. Whitespace is a character I think.

But I am not sure why my eclipse editor is not displaying an error related to this?

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE person [
<!ELEMENT person (picture) >
<!ELEMENT picture  EMPTY >
]>
<person>

 <picture></picture>

</person>

Any thoughts?

  • 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-18T05:02:05+00:00Added an answer on May 18, 2026 at 5:02 am

    The XML you’ve posted doesn’t actually include any whitespace which is why it validates just fine. If you had something like this:

    <person>
         <picture> </picture>
    </person>
    

    you would have whitespace. An empty element can be written as either <picture/> or <picture></picture>. They are equivalent.

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

Sidebar

Related Questions

I've just started learning ruby, so this question is simple. I created @subject in
hi I started learning google data api. I have one question What will be
I just started learning about servers, and I am messing around with Google's App
Just started learning NHiberate. It seems rather tedious to write proper hbm.xml config files
I just started learning spring. what should be avoided while writing an ApplicationContext xml
When i started learning android i learned that R.java files goes to /gen folder
I started learning Delphi two days ago but I got stuck. I broke down
I started learning html recently, and one thing that really confused me is why
I've only started learning Java about 3 months ago and this is my first
I just started learning Android yesterday and would like to code a very simple

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.