How to define XML Element?

How to define XML Element?

 Everything inside the open and closed tag is called as XML Element.It may be contain other element and text or may be a combination of both.

I have given you example which help you to understanding element in XML.


   <book category=\"JAVA\">

      <title lang=\"en\">The Complete Reference </title> 

      <author>Herbert Schildt</author>     




   <book category=\"C++\">  

      <title lang=\"en\">Programming in ANSI C++</title>   

      <author>E Balaguruswamy</author>    




   <book category=\"C\">  

      <title lang=\"en\">Exploring C</title>   

      <author>Yashwant kanetkar</author>   





 Above,bookstore and book both are element content where as title,author,year and price are text also called as attribute and JAVA,C++ and C is the value of book attribute.

Date:2014-01-09 00:00:00

Post Your Answers

User Email:

User Name:

Related XML Subjective Links

XML Subjective interview questions and answers for experienced and fresher