GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Programming  >  XML
Go To First  |  Previous Question  |  Next Question 
 XML  |  Question 17 of 40    Print  
What are the rules to be followed in the usage of closing tag in XML?

  
Total Answers and Comments: 1 Last Update: March 27, 2007     Asked by: blenda 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
March 27, 2007 19:42:10   #1  
navneet_kaur Member Since: February 2007   Contribution: 5    

RE: What are the rules to be followed in the usage of ...
One big difference between XML and HTML is that an XML document is always constrained to be well formed. There are several rules that determine when a document is well formed but one of the most important is that every tag has a closing tag. So in XML the </to> tag is not optional. The <to> element is never terminated by any tag other than </to>.

Sometimes though it makes sense to have a tag that stands by itself. For example you might want to add a tag that flags the message as important: <flag/>.

This kind of tag does not enclose any content so it's known as an empty tag. You create an empty tag by ending it with /> instead of >. For example the following message contains an empty flag tag:

<message to "you@yourAddress.com" from "me@myAddress.com" 
subject "XML Is Really Cool">
<flag/>
<text>
How many ways is XML cool? Let me count the ways...
</text>
</message>

 
Is this answer useful? Yes | No

 Related Questions

Latest Answer : One big difference between XML and HTML is that an XML document is always constrained to be well formed. There are several rules that determine when a document is well formed, but one of the most important is that every tag has a closing tag. So, in ...
Read Answers (1) | Asked by : blenda

Latest Answer : 1) must have root tag2) case sensitive3) all tag must be closed4) attributes value must be "" or '' ...
Read Answers (1) | Asked by : joel

Latest Answer : Rules for making a tag name are1.It should start with a letter or underscore(_)2.There are no reserved words , but however xml(in any case) should not be used as a tag name3.It can include digits, hyphen,periods, ':' can be used but best ...
Read Answers (4) | Asked by : janelyn


 Sponsored Links

 
Related Articles

Concepts of Object-Oriented Programming

Object Oriented JavaScript In this chapter you ll learn about OOP Object Oriented Programming and how it relates to JavaScript As an ASP NET developer you probably have some experience working with objects and you may even be familiar with concepts such as inheritance However unless you re already a
 

N-Tier Architecture: The Business Rules Layer

N Tier Architecture The Business Rules Layer Business Rules Layer in N Tier Architectures The Business Rules Layer in an N Tier architecture is that layer that contains the Business logic and or Business rules of the application Reserving a separate layer strictly for Business logic in an N Tier arc
 

SOA Industry Usage

SOA Industry Usage First time usage of SOA tends to highlight the need for semantic interoperability While SOA provides framework for integration of cross Business operations with information flow in real time there is also a major semantic interoperability conflict that is not being addressed dir
 

SQL Programming

SQL Programming Overview Anybody who has done something for a long time has probably wanted to change how things work at some point or another. A worker at a mill might have found a more efficient way of cutting logs, or a mathematics teacher might have had a hand in changing a school&rsquo;s al
 

The Interview Snafu

How to turn someone else&rsquo;s mistake to your advantage Your dream job is about to become reality. A recruiter gave you the heads up about the perfect position at Humungous Conglomerate, Inc. You went through five interviews as well as a battery of psychological tests mandated by their HR de
 

Winning a Job Interview with a Winning Resume

Does your resume unlock your potential, take your skills to the highest level and win you the interview and the job you want now? The job market today is highly competitive and even if you think you have what it takes to get an interview you won&rsquo;t get over the line without a polished, prof
 

WinRunner Programming Concepts

If you want to create WinRunner scripts that are highly efficient, there are important programming concepts that you will want to become familiar with. Understanding these concepts will provide you with a large number of key benefits. In addition to understanding these concepts, you must also learn
 

Industry Usage of VoiceXML

Wireless communications tools have a number of disadvantages, and some of these are small screens, weak processing power, and a lack of sufficient input abilities. It is these three factors that have greatly limited the scope of many wireless devices, and it is hoped that VoiceXML will remedy many
 

Tried and True Resume Writing Rules

You can have all the experience, personality, and credentials you need to land the best jobs in any area of the world, but if you don&rsquo;t know how to put them onto paper in the form of a resume, you may be unemployed. Writing a resume isn&rsquo;t as simple as scribbling down your past ex
 

Programming Languages Certification

IT Certification programs have several options that will offer you the best knowledge.&nbsp; By learning everything that you need to know about information technology you will be able to open new doors to your career and personal business desires.&nbsp; IT Certification offers several vari
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape