NCERT Solutions Class 10 Computers Introduction to XML

NCERT Solutions Class 10 Computers Introduction to XML have been provided below and is also available in Pdf for free download. The NCERT solutions for Class 10 Computers have been prepared as per the latest syllabus, NCERT books and examination pattern suggested in Class 10 by CBSE, NCERT and KVS. Questions given in NCERT book for Class 10 Computers are an important part of exams for Class 10 Computers and if answered properly can help you to get higher marks. Refer to more Chapter-wise answers for NCERT Class 10 Computers and also download more latest study material for all subjects. Introduction to XML is an important topic in Class 10, please refer to answers provided below to help you score better in exams

Introduction to XML Class 10 Computers NCERT Solutions

Class 10 Computers students should refer to the following NCERT questions with answers for Introduction to XML in Class 10. These NCERT Solutions with answers for Class 10 Computers will come in exams and help you to score good marks

Introduction to XML NCERT Solutions Class 10 Computers

Very Short Answer Type Questions 

Question. What do you mean by XML file?
Answer: XML file or XML document is a component of XML document system which contains the real data and its semantics.

Question. List the components of prolog.
Answer: 1. An XML Declaration
2. Processing Instructions (PI)
3. Document Type Definition (DTD)
4. Comments
5. White Spaces and New line

Question. By which we can describe the properties of elements?
Answer: The properties of elements can be described through attributes.

Question. Write the components of an XML file in terms of logical structure.
Answer: An XML file contains:
1. an optional prolog
2. a data instance

Question. How will you define an element in DTD contain plain text?
Answer: If an element should contain plain text, you define the element using #PCDATA.PCDATA stands for Parsed Character Data and is the way you specify non-markup text in
your DTDs.

Question. What does XML parser do?
Answer: An XML parser basically checks whether a document is following XML standard or not.

Question. Which document is used to define the style of an XML document?
Answer: CSS is a text document (or stylesheet) that is commonly used to define the style and layout of an XML document.

Question. Can same CSS document be used in multiple XML documents?
Answer: Yes, the same CSS document can be used in multiple XML documents.

Question. Explain the usage of an XML parser. 
Answer: XML parser is a software used to read, write and update to an XML document. An XML parser converts an XML document into an XML DOM object.


Short Answer Type Questions 

Question. What does it mean when we say that XML tags are case sensitive?
Answer: The case sensitivity of XML tags means, the opening and closing tags must be in the same case. The following codes is an example of a well-formed document, where the
opening and closing tags are in the same case, i.e. <Name>Amit </Name>

Question. List the important points to create an XML document.
Answer: The points while creating an XML documents are as follows:
1. XML documents must have starting and closing tags.
2. XML tags are case sensitive.
3. XML elements must be properly nested.
4. XML documents must have one root element.
5. The values of XML attributes must be enclosed in double quotes.

Question. Explain the utility of comments in XML.
Answer: A comment is a note or information that appears in the code of an XML document to help you understand the code better.
Comments are not displayed in the output. They are not part of the program and therefore, are not parsed by the XML parser.

Question. State whether the following XML document is well-formed or not
<Student> Mapoj </Student>
<Student> Ankur</Student>
Answer: The preceding XML document is not well-formed because it contains two root elements. An XML document contains only one root element.

Question. Name some languages, which are derived from XML.
Answer: Some languages are as follows:
1. Ink Markup Language (InkML)
2. Business Narrative Markup Language (BNML)
3. Financial Product Markup Language (FPML)
4. Virtual Human Markup Language (VHML) .
5. Architecture Description Markup Language (ADML)
6. Artificial Intelligence Markup Language (AIML)
7. Chess Markup Language (ChessML) etc.

Question. Define prolog and data instance.
Answer: The prolog is a preface or introduction to XML document. It can contain upto five optional components. The grammar structure of the XML document is defined under prolog.
The data instance consists of real data and its description through elements. It is also known as body of XML document.

Question. Create XML markup to represent a message sent on 7 June, 2014 to Amit and Saurabh by Mohit. The message is “Submitted Successfully”.
Answer: <?xml version = "1.0"?>
<message date="7/6/2014">
<sender> Mohit </sender>
<receiversXreceiver> Amit </receiver>
<receiver> Saurabh </receiver> </receivers>
<text> Submitted Successfully </text>
</message>

Question. Write the procedure to link a stylesheet with an XML document.
Answer: Using CSS with an XML Document
To link an XML document with a stylesheet perform the following steps:
1. Create an XML document and save it as a file with the .xml extension.
2. Create a stylesheet and save it as a file with the .css , extension.
3. Link both the files in the XML document by using the PI.
<?xml-stylesheet href = “test.css” type = “text/css”?>
e.g. The following is the CSS document:
People
{
background-color : light green;
display : block;
padding : 5px;
font-family : arial;
}
Person
{
background-color : pink;
border : 2px solid black;
display : block;
margin-bottom : 5px;
Name
{
font-family : bold;
display : block;
}
Birthdate
{
display : block;
}
Eyes
{
display : block;
}
Now, save it as test.css
The following is the XML document:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type = "text/css" href = "test.css"?>
<People>
<Person>
<Name>A</Name>
<Birthdate>Jan 24, 1987</Birthdate>
<Eyes>Blue</Eiyes>
</Person>
<Person>
<Name>B</Name>
<Birthdate>Dec 15, 2009</Birthdate>
< Eyes >Brown</Eyes >
</Person>
</People>
Now, save it as test1.xml

Question. What do you mean by Processing Instructions (PI)?
Answer: PI can be used to pass information to applications in such a way that escapes most XML rules. Its main use is of linking to an XML stylesheet in the prolog of an XML document.Processing instructions do not have to follow much internal syntax, it can include markup characters without escaping them and can appear anywhere in the document.
NCERT-Solutions-Class-10-Foundation-of-Information-Technology-Introduction-to-XML-1

Question. Explain child elements with an example.
Answer: The elements nested inside other elements are called child elements.
Consider the following code:
NCERT-Solutions-Class-10-Foundation-of-Information-Technology-Introduction-to-XML-2

Question.  Write the full form of
1. XML
2. DTD
3. SGML
4. CSS
Answer: Full form of given terms are as follows:
1. XML extensible Markup Language
2. DTD Document Type Declaration
3. SGML Standardised Generalised Markup Language
4. CSS Cascading Style Sheet


Long Answer Type I Questions 

Question. Explain two softwares which are used to validate XML documents.
Answer: Two important software that validate or process XML documents are as follows:
1. XML Validator are the software packages that check the XML document as per the specified DTD and give you feedback about the document.
Some XML validators are as follows:
(a) W3C XML Validator
(b) Tidy
(c) XML. com’s
(d) Brown University

2. XML Parsers are the software packages, which are part of bigger applications that provide XML support.
The role of an XML parser is to dissect a valid XML document to obtain actual data
from the XML document. Some XML parsers are as follows:
(a) SAXfSimple API for XML)
(b) Expat
(c) LT-XML etc.

Question. Write an XML document that marks up the following data:
All these must be rendered. Use attribute to make the data more informative.
NCERT-Solutions-Class-10-Foundation-of-Information-Technology-Introduction-to-XML-3

Answer:
<?xml version = "1.0" encoding="UTF-8" standalone = "yes"?>
<employees>
<employee EmpID = "e001">
<Name> Raj Kumar </Name>
<City> Delhi </City></employee>
<employee EmpID="e002">
<Name> Pankaj </Name>
<Ci ty> Mumbai </City></employee>
<employee EmpID="e003">
<Name> Rahul Sharma </Name>
<City> Delhi </City> </employee>
<employee EmpID="e004">
<Name> Praveen </Name>
<City> Noida </City></employee>
</employees>

Question. Compare XML with similar type of other languages.
Answer:
1. Comparing XML and SGML
NCERT-Solutions-Class-10-Foundation-of-Information-Technology-Introduction-to-XML-4

NCERT-Solutions-Class-10-Foundation-of-Information-Technology-Introduction-to-XML-5

Question. Consider the following XML document.
Check this for well- formedness.
<Employees><FirstName> Ambrish
<MiddleName> Kumar</FirstName>
</MiddleName>
<lastname> Garg </LastName>
</Employees>
Answer:
The above XML document is not well-formed.
The document suffers from two errors which are as follows:
1. Improper nesting The MiddleName element is opened inside the FirstName element, yet MiddleName is not closed before the FirstName element is closed.
2. Mismatched cases of start and end tags The tag <lastname> is closed with </LastName>, which is incorrect. XML is case sensitive, thus the end tag of <lastname> should be </lastname>.

Question. Explain the structure of XML document.
Answer: Structure of XML- File/Document
Every XML document includes both physical and logical structure which are as follows:
1. Physical Structure
It contains the actual data used in a document. The basic storage unit called entity, each of which may refer to other entities. An entity has a name and content. It contains references to other entities. There is a special entity called document entity or root, that serves as a main storage unit. XML processor always start document processing from that unit.We have three classifications of entities, these are as follows:
1. Internal and External Entities
For internal entity, there is no separate physical storage object and the content of the entity is given in the declaration. It contained inside the document. If the entity is not internal, then it is an external entity.
2. General and Parameter Entities
General entities are entities which are used within the document content. In this specification, general entities are sometimes referred to with the unqualified entity, when this leads to no ambiguity. Generally, entities are declared and used differently. Parameter entities are parsed and used only in the DTD part of the XML document.
3. Parsed and Unparsed Entities
Parsed entities contain text that is referred as replacement text intended to be processed by the parser and is considered as an integral part of the document.Unparsed entities are resources that can be of any type including text objects. This type of entity is never process by parser.
2. Logical Structure
It is a template that enables the elements to be included in a document and in the order in which they have to be included.
The logical structure includes the basic components of the XML document. It indicates how a document is built, irrespective of what a document contains. The first structural element is prolog which is the base for the logical structure.

The structure of the document of example code
NCERT-Solutions-Class-10-Foundation-of-Information-Technology-Introduction-to-XML-6

Question. A well-formed document must have a root element. Explain with an example.
Answer: To create a well-formed XML document, it is necessary for it to have a root element. A root element is a unique element that contains all other elements in the XML document.
The XML document cannot contain more than one root element.
The following code is an example of a well-formed document:
<address>
<city> Delhi </city>
<state> Delhi </state>
<country> India </country>
</address>
Consider the same code written in the following way:
<city> Delhi </city>
<state> Delhi </state>
<country> India </country>
The preceding code is not a well-formed document, since it does not contain a root element.

Question. Explain the difference between a well-formed and a valid XML documents. 
Answer:
1. Well-Formed XML Documents
A “Well-Formed” XML document means that document has the correct XML syntax.
The XML document that follows XML grammar rules is called well-formed document. A document that includes sequence of markup characters that cannot be parsed or are invalid
cannot be well-formed. The following points are to be kept in mind for a valid XML document:

NCERT-Solutions-Class-10-Foundation-of-Information-Technology-Introduction-to-XML-7

NCERT-Solutions-Class-10-Foundation-of-Information-Technology-Introduction-to-XML-7

2. Valid XML Document
A valid XML document is .not only a well-formed document but as well as they also checked error against a DTD or schema. DTD is a set of rules that defines what tags appear, what value those tags may contain and how the tags are related to each other in an XML document. Validation can be done only if the XML document has valid DTD. When an XML document is checked or parsed according to a particular structure or guidelines, the process is known as validation of the document.

Question. Define CSS. How to create a CSS file?
Answer: CSS is a simple design language intended to simplify the process of making Web pages presentable.
CSS is a type of stylesheet and this stylesheet consists of a list of rules. You can include a CSS in multiple XML documents that have the same data structure.
Syntax
selector
{
property: value; } Declaration Block
}
Creating a CSS File
To create a CSS file, you need to have all the style rules composed in it and save it with extension .css

NCERT-Solutions-Class-10-Foundation-of-Information-Technology-Introduction-to-XML-9

NCERT-Solutions-Class-10-Foundation-of-Information-Technology-Introduction-to-XML-10

Long Answer Type II Questions 

Question. Write two points of difference in HTML and XML. Write three points of wellformed XML document. Write the code to create an XML document to present following data: 
NCERT-Solutions-Class-10-Foundation-of-Information-Technology-Introduction-to-XML-11

1. The document must have a root element.
2. The element must have the opening and closing tags.
3. XML attributes values, should be in double quotation marks.
<?xml version ="1.0" encoding="UTF-8" standalone="yes"?>
<Data><Datal>
<Furniture>Table</Furniture>
<Material >Wood</Material >
<Quantity>75</Quantity>
<Floor>1st</Floor>
</Datal>
<Datal>
<Furniture>Chair</Furniture>
<Materi al >Plastic</Materi al >
<Quantity>85</Quantity>
<Floor>IInd</Floor>
</Datal>
</Data>

Question. XML document structure can be divided in which two parts? What is meant by valid XML document (write three points)? Write the code to create an XML document to present following data:
NCERT-Solutions-Class-10-Foundation-of-Information-Technology-Introduction-to-XML-12

Answer: XML document structure can be divided into two parts as follows:
1. Well-formed XML document
2. Valid XML document
A valid XML document means to follow several terms, such as follows:
1. It is not only a well-formed document but as well as check error against a DTD.
2. It signifies that a document is well-formed.
3. It uses XML parser, XML validator for validation.
The XML code is
<?xml version = "1.0" encoding = "UTF-8"?>
<Employees>
<Employee>
<Name> Srishti </Name>
<Job> Programmer </Job>
<Department> Engineering </Department>
<Cubicle> 5E </Cubicle>
</Employee>
<Employee>
<Name> Aditi </Name>
<Job> Designer </Job>
<Department> Marketing </Department>
<Cubicle> 19T </Cubicle>
</Employee>
</Employees>

Question. Write two points of differences between XML and HTML. What is meant by a well-formed XML document (write two points)? Write the code to create an XML document with following data:
NCERT-Solutions-Class-10-Foundation-of-Information-Technology-Introduction-to-XML-13

Answer: The differences between XML and HTML are as follows:
1. HTML has predefined tags while XML has user-defined tags.
2. HTML document can be viewed directly by the Web browser while XML document cannot be viewed directly and need some proper stylesheet files.
A well-formed document means to follow several generic rules, such as follows:
1. XML document must contain atleast one element.
2. All tags must have the opening and closing tags as these XML tags are case sensitive.
The XML code is
<?xml version = "1.0" encoding = "UTF-8"?>
<Travels> <Travel>
<Designation> Singapore </Designation>
<Cost> 200000 </Cost>
<No_of_days> 8 </No_of_days>
<Mode_of_trans> Aeroplane </Mode_of_trans>
</Travel>
</Travel>
<Designation>Shimla</Designation>
<Cost> 10000 </Cost>
<No_of_days> 4</No_of_days>
<Mode_of_trans> Bus </Mode_of_trans>
</Travel></Travels>

Question. Explain with a help of an example, how root elements are placed in a XML document?
Answer: XML documents must contain one element that is the parent of all other elements.
This element is called the root element. The root element encloses all other elements in XML. All other elements inside the root elements are the form of child element. The structure of the XML file should look like
<root>
<child>
<subchild>....</subchild>
</child>
</root>
e.g.
<company>
<employee>
<ecode> 101 </ecode>
<name> Rahul </name>
</employee>
<employee>
<ecode> 102 </ecode>
<name> Sahil </name>
</employee>
<employee>
<ecode> 103 </ecode>
<name> Muskan </name>
</employee>
</company>
You can see in the above example that the root element declared out here is <company> then comes the child element <employee> which in turn stores the <ecode> and <name> of the employee in the tags.

Question. Draw the XML tree for code given below: 
<Library>
<Books category="Thriller">
<Author>ABC</Author)
<Price>150</Price>
</Books>
<Books category="Fiction">
<Author>EFG</Author)
<Price>250</Price>
</Books>
</Library>
Answer: The XML tree is
NCERT-Solutions-Class-10-Foundation-of-Information-Technology-Introduction-to-XML-14

Question. Draw the XML tree for the code given below: 
<MOVIES>
<ENGLISH>
<NAME> PLAYERS </NAME>
<DIRECTOR) ABC </DIRECTOR>
<PRODCOST> 50 Lakhs</PRODCOST>
</ENGLISH>
<HINDI>
<NAME> KHILADI </NAME>
<DIRECTOR> XYZ </DIRECTOR)
<PRODCOST> 70 Lakhs</PRODCOST>
</HINDI>
</MOVIES>
Answer: The XML tree is
NCERT-Solutions-Class-10-Foundation-of-Information-Technology-Introduction-to-XML-15

Question. Write the DTD for the following XML document:
<Examples>
<example>
<name> CSS example </name>
<url> http://www.google.com </url>
</example>
<example>
<name> DTD example </name>
<url> http://www.google.com </url>
</example>
</Examples>
Answer:
<?xml version = "1.0" standalone = "yes"?>
<!DOCTYPE Examples![
<!ELEMENT Examples (example)>
<! ELEMENT example (name, url )>
<!ELEMENT name (#PCDATA)>
<! ELEMENT url (#PCDATA)>
]>

Question. Vallesoft Pvt. Ltd has designed and developed a Website that will be displayed differently in each of the continents. It has decided to use XML instead of HTML to develop the Website.
(i) A developer has written some XML code. Which of the following XML code fragments is well-formed?
<channel> <time> STAR TV 9.00 PM </channel> </time>
<Description> Family Drama </description>
(ii) Correct all the mistakes in the XML code fragments that are not well-formed given in part (i).
(iii) Design an XML tree for the following XML code:
<program>
<channel> STAR TV </channel>
<time> 9.00 PM </time>
<day> Monday, Tuesday, Wednesday </day>
<description> Family Drama </description>
</program>
Answer:
(i) None of the given code fragments are well-formed.
(ii) The correct code is:
<channel> <time> STAR TV 9.00PM </time> </channel>
<Description> Family Drama </Description>
(iii) The XML tree is
NCERT-Solutions-Class-10-Foundation-of-Information-Technology-Introduction-to-XML-16

Question. Draw the XML tree for the code given below: 
< DIET>
<MORNING>
<CEREAL> OATS </CEREAL>
<FRUIT> PAPAYA </FRUIT>
<LIQUID> TEA </LIQUID> </MORNING>
<AFTERNOON>
<CEREAL> BRAN </CEREAL>
<FRUIT> APPLE </FRUIT>
<LIQUID> JUICE </LIQUID>
</AFTERNOON>
</DIET>
Answer: The XML tree is
NCERT-Solutions-Class-10-Foundation-of-Information-Technology-Introduction-to-XML-17

Question. Draw the XML tree for the code given below:
<employees>
<employee sex = "male">
<name>
<first> Harry </first>
<last> Potter </last>
</name>
</employee>
<employee sex = "female">
<name>
<first> Linda </first>
<1ast> Ray </last>
</name>
</employee>
</employees>
Answer: The XML tree is
NCERT-Solutions-Class-10-Foundation-of-Information-Technology-Introduction-to-XML-18

Question. Draw the XML tree for the code given below:
<bookstore>
<book>
<title> ABC of Computers </title>
<author> A. Gandhi </author>
<year> 2005 </year>
<pri ce> 29.99 </pri ce></book>
<book>
<title> Learning XML </title>
<author> Erik T. Ray </author>
<year> 2003 </year>
<price> 39.95 </price>
</book>
</bookstore>
Answer: The XML tree is
NCERT-Solutions-Class-10-Foundation-of-Information-Technology-Introduction-to-XML-19

Question. Create a DTD for storing book information for a library. The DTD should contain details about each book in terms of title, author (name), number of copies, all of which can store character data. The number of copies should contain two attributes named ‘inhand’ and issued which are both mandatory.
Answer:
<?xml version = "1.0">
<!DOCTYPE LIBRARY [
<!ELEMENT LIBRARY (BOOK +)>
<!ELEMENT BOOK (TITLE, AUTHOR, NOC)>
<!ELEMENT AUTHOR (NAME)>
<!ELEMENT TITLE (# PCDATA)>
<!ELEMENT NAME (# PCDATA)>
<!ELEMENT NOC (# PCDATA)>
<! ATTLIST NOC INHAND ISSUED CDATA # REQUIRED>
]>

Multiple Choice Questions 

Question. XML uses
(a) Only 5 tags
(b) Predefined tags
(c) Custom tags
(d) HTML tags
Answer: (c) XML uses user defined or custom tags.

Question. XML was not designed to
(a) display Web pages
(b) store data
(c) carry data
(d) Both (b) and (c)
Answer: (a) XML was designed to store and carry data, not to display Web pages.

Question. A root element is
(a) a bridge between HTML and XML
(b) the parent of all other elements
(c) child element of the parent
(d) None of the above
Answer: (b) A root element is the parent of all other elements.

Question. An XML document can be viewed in a 
(a) Word processor
(b) Web browser
(c) Notepad
(d) None of these
Answer: (b) An XML document can be viewed in a Web browser.

Question. Name the root element in the following XML document:
<father>
<child1>
<name> Megha </name>
<age> 12 </age>
</child1>
<child2><name > Mana </name>
<age> 15 </age>
</child2>
</father>
(a) child 1
(b) child2
(c) father
(d) name
Answer: (c) father is the root element.

Question. Which of them is the correct statement?
(a) An XML elements must have a closing tag.
(b) An XML elements must be lowercase.
(c) An XML documents must have a DTD.
(d) All of the above
Answer: (a) An XML elements must have a closing tag.

Question. Which is not a correct name for an XML element?
(a) <xmldocument>
(b) <7eleven>
(c) <phone_number>
(d) <root>
Answer: (b) <7eleven> is not a correct name for an XML element.

Question. XML allows you to 
(a) create new tags
(b) arrange your tags in any order
(c) closing tags are not required
(d) All of the above
Answer: (b) XML allows you to arrange your tags in any order.

Question. Which one of these is correct syntax of the declaration, that defines the XML version?
(a) <?xml version = "1.0"?>
(b) <?xml version = "1.0">
(c) </xml version = ”1.0">
(d) <xml version = "1.0"?>
Answer: (a) <?xml version = “1.0”?> is a correct syntax of the declaration

Question. The way of describing XML data is
(a) XML uses XSL to describe data
(b) XML uses a description node to describe data
(c) XML uses a DTD to describe the data
(d) None of the above
Answer: (c) XML uses a DTD to describe XML data.

Question. Which of the following is a prolog component? 
(a) Element
(b) Tab
(c) White space
(d) All of these
Answer: (a) Element is a prolog component.

Question. PI is a component of
(a) prolog
(b) data instance
(c) element
(d) root element
Answer: (a) PI is a component of prolog.

Question. To link an XML document with a stylesheet, you need to
(a) use the PI component in the XML document
(b) use the document declaration component in the XML document
(c) add the tag in the XML document
(d) None of the above
Answer: (a) To link an XML document with a stylesheet, you have to use the PI component in the XML document.

Question. The XML document is like a
(a) tree structure
(b) inverted tree structure
(c) flat structure
(d) None of the above
Answer: (a) The xml document is like a tree structure.

Question. What does XML stand for? 
(a) Extra Markup Language
(b) extensible Markup Language
(c) Example Markup Language
(d) None of the above
Answer: (b) extensible Markup Language

Question. What does DTD stand for?
(a) Dynamic Type Definition
(b) Dynamic Type Declaration
(c) Document Type Declaration
(d) Document Type Definition
Answer: (c) Document Type Declaration

Question. In XML, value of attribute must appear 
(a) in uppercase
(b) in brackets
(c) in quotes
(d) in lowercase
Answer: (c) in quotes

Question. DTD definition is used alongwith XML to specify 
(a) the presentation of XML document
(b) the links with other documents
(c) the structure of XML document
(d) None of the above
Answer: (c) DTD definition is used alongwith XML to specify the structure of XML document.

Question. Valid XML document means 
(a) the documents has one root element
(b) the document contains atleast one or more root elements
(c) the XML document has a DTD associated with it and it compiles with that DTD
(d) each element must nest inside any enclosing element properly
Answer: (c) Valid XML document check errors and has DTD or schema and compiles to it.

Question. Comments in XML are
(a) having the same syntax as that of comments in HTML
(b) used to add additional notes
(c) not displayed on the final Web page
(d) All of the above
Answer: (d) All of the above

Question. Comment in XML can be given by: 
(a) <?-->
(b) <!-- >
(c) <?!-->
(d) <!?-->
Answer: (b) <!–>

Question. Which of the following XML fragments are well-formed?
(a) < element attribute = value >
(b) < element attribute = "value" >
(c) < element attribute = !value >
(d) < element attribute ='value'>
Answer: (b) < element attribute = “value” > all well-formed.

Question. How is an empty element defined in XML?
(a) <name> </name>
(b) <name/>
(c) name/
(d) All of these
Answer: (b) The empty tag name is followed by <name/>

Question. Is this, a “well-formed” XML document? 
<?xml version = "1.0"?>
<note>
<to age="29"> Tove </tO>
<from> Jani </from>
(a) Yes
(b) No
(c) Cannot be determined without the DTD
(d) None of the above
Answer: (b) No, because </tO> is not a correct element and element is not closed.

Question. Well-formed XML document means
(a) it contains a root element
(b) it contains an element
(c) it contains one or more elements
(d) must contain one or more elements and root elements
Answer: (d) Well-formed XML document must contain one or more elements and root element must contain all other elements.

Question. An XML parser is used to
(a) extract data from the XML file and build tree like structure.
(b) check whether or not an XML document is well-formed.
(c) Both (a) and (b)
(d) None of the above
Answer: (b) Check whether or not an XML document is well-formed.

Question. An XML document that follows the XML syntax is called a 
(a) valid XML document
(b) well-formed XML document
(c) correct XML document
(d) All of the above
Answer: (b) well-formed XML document

Question. Which of the following is not an online XML validator?
(a) W3C validation service
(b) Tidy
(c) XML.com’s
(d) expat
Answer: (d) expat is an online XML parser not an online XML validator.

Question. What makes XML more powerful than HTML?
(a) The fact that it’s supported by all of the major software vendors.
(b) Not as much coding is needed.
(c) Its ability to adopt to new uses.
(d) None of the above
Answer: (c) XML is more powerful than HTML because we can define our own tags for different uses in XML.

Question. HTML and XML are
(a) markup languages
(b) programming languages
(c) system softwares
(d) utilities
Answer: (a) Both HTML and XML are markup languages.

 

Fill in the Blanks [1 Mark each]

Question. ……… is used to define the structure of an XML document.
Answer: DTD

Question. XML is subset of ……….. . CBSE 2016
Answer: SGML

Question. An XML attribute is a ………. of an element.
Answer: property >

Question. XML attribute values should always be enclosed in ………… . 
Answer: double quotes

Question.  ……….. are the building blocks of an XML document and are represented by using tags.
Answer: Elements

Question. The combination of XML document, DTD and stylesheet is known as ………. .
Answer: XML document system

Question. An element can be written without the end tag.
Answer: empty

Question. An attribute is a ……….. pair contained in the start tag of the element.
Answer: name-value

Question. In all XML documents, the ………….. element is the parent of all other elements.
Answer: root

Question. All XML documents must have one element. 
Answer: root

Question. ………. refers to the preface to an XML document.
Answer: Prolog

Question. In XML, ……….. cannot contain multiple values.
Answer: attributes

Question. You can validate an XML document by using the XML validator and …………… .
Answer: XML parser

Question. A ………… confirms to all the XML guidelines.
Answer: well-formed document

Question. An XML document has both a ……….. structure and a ………….. structure.
Answer: physical, logical

Question. We need a/an ………….. to create and edit an XML document. 
Answer: XML parser

Question. ……… is a text document that is commonly used to define the style and layout of an XML document.
Answer: CSS

Question. The ……….. is an XML element to which the CSS style is applied.
Answer: selector

Question. ……….. is used to describe data and ……….. is used to display data. 
Answer: XML, HTML

 

True or False [1 Mark each]

Question. XML is used to define other languages.
Answer: True XML is a meta language, which is used to define other languages.

Question. XML is case sensitive. 
Answer: True XML is case sensitive, while HTML is not case sensitive.

Question. XML is widely used for storing data.
Answer: True XML is used to describe data and storing data.

Question. XML is extensible Meta Language. 
Answer: False XML is not an extensible Meta Language. It is extensible Markup Language.

Question. A tag only consists of opening angular bracket.
Answer: False A tag consists of opening as well as closing angular brackets (<>).

Question. XML is a platform-independent language.
Answer: True XML can run on all platforms, so it is platform-independent language.

Question. The root element is a parent element of all other elements in data instance.
Answer: True The root element is an element that contains all other elements in XML document.

Question. The values of the attributes are enclosed in double question marks.
Answer: False The values of the attributes are enclosed in double quotation marks.

Question. A special character can be defined as a short name given to a set of information.
Answer: True When a special character is used in an XML document, it expands to its full definition.

Question. XML is design to describe data.
Answer: True The focus of XML is on the description of data, not its presentation.

Question. DTD is a set of rules that defines what tags appear in an HTML document. 
Answer: False DTD is used in XML documents.

Question. An XML document can have only limited number of child elements.
Answer: False XML document can have unlimited number of child elements.

Question. Pseudo attributes are the settings that appear in prologs.
Answer: True Pseudo attributes describe the overall document.

Question. Names in XML document must start either with a letter, number or underscore.
Answer: False Names in XML must start either with a letter or underscore character.

Question. XML uses a DTD to describe its data to users.
Answer: True The DTD are used in XML to specify its information and data to users.

Question. In XML, tag names cannot contain spaces but can uses underscores.
Answer: True Tag name must start either with a letter or underscore (_) character.

Question. In XML, every opening tag may not have a closing tag. 
Answer: False Every tag must contain the opening and closing tag.

Question. Extension of an XML files is .html.
Answer: False html is the extension of HTML file. An XML file extension is .xml.

Question. One of the attributes of XML tag is Type.
Answer: True type is a attribute of XML tag.

Question. Comments are displayed in the output.
Answer: False Comments are not displayed in the output.

Question. XML document must have one root element. 
Answer: True XML document must have one root element.

Question. Physical structure includes the actual data of an XML file.
Answer: True Physical structure stores actual data in the form of entity.

Question. A valid XML document that follows all grammar rules is well-formed document.
Answer: True A well-formed XML document means that the document has the correct XML syntax and follows proper grammar rules.

Question. Both HTML and XML are markup language used to format data. 
Answer: False XML is used to describe data, while HTML is used to format data.

Question. HTML is about displaying information while XML is about describing information.
Answer: True HTML was designed to describe data with focus on how data look while XML was designed to describe data with focus on what data is.fv

More Study Material

NCERT Solutions Class 10 Computers Introduction to XML

NCERT Solutions Class 10 Computers Introduction to XML is available on our website www.studiestoday.com for free download in Pdf. You can read the solutions to all questions given in your Class 10 Computers textbook online or you can easily download them in pdf.

Introduction to XML Class 10 Computers NCERT Solutions

The Class 10 Computers NCERT Solutions Introduction to XML are designed in a way that will help to improve the overall understanding of students. The answers to each question in Introduction to XML of Computers Class 10 has been designed based on the latest syllabus released for the current year. We have also provided detailed explanations for all difficult topics in Introduction to XML Class 10 chapter of Computers so that it can be easier for students to understand all answers.

NCERT Solutions Introduction to XML Class 10 Computers

Class 10 Computers NCERT Solutions Introduction to XML is a really good source using which the students can get more marks in exams. The same questions will be coming in your Class 10 Computers exam. Learn the Introduction to XML questions and answers daily to get a higher score. Introduction to XML of your Computers textbook has a lot of questions at the end of chapter to test the students understanding of the concepts taught in the chapter. Students have to solve the questions and refer to the step-by-step solutions provided by Computers teachers on studiestoday to get better problem-solving skills.

Introduction to XML Class 10 NCERT Solution Computers

These solutions of Introduction to XML NCERT Questions given in your textbook for Class 10 Computers have been designed to help students understand the difficult topics of Computers in an easy manner. These will also help to build a strong foundation in the Computers. There is a combination of theoretical and practical questions relating to all chapters in Computers to check the overall learning of the students of Class 10.

Class 10 NCERT Solution Computers Introduction to XML

NCERT Solutions Class 10 Computers Introduction to XML detailed answers are given with the objective of helping students compare their answers with the example. NCERT solutions for Class 10 Computers provide a strong foundation for every chapter. They ensure a smooth and easy knowledge of Revision notes for Class 10 Computers. As suggested by the HRD ministry, they will perform a major role in JEE. Students can easily download these solutions and use them to prepare for upcoming exams and also go through the Question Papers for Class 10 Computers to clarify all doubts

Where can I download latest NCERT Solutions for Class 10 Computers Introduction to XML

You can download the NCERT Solutions for Class 10 Computers Introduction to XML for latest session from StudiesToday.com

Can I download the NCERT Solutions of Class 10 Computers Introduction to XML in Pdf

Yes, you can click on the link above and download NCERT Solutions in PDFs for Class 10 for Computers Introduction to XML

Are the Class 10 Computers Introduction to XML NCERT Solutions available for the latest session

Yes, the NCERT Solutions issued for Class 10 Computers Introduction to XML have been made available here for latest academic session

How can I download the Introduction to XML Class 10 Computers NCERT Solutions

You can easily access the links above and download the Introduction to XML Class 10 NCERT Solutions Computers for each chapter

Is there any charge for the NCERT Solutions for Class 10 Computers Introduction to XML

There is no charge for the NCERT Solutions for Class 10 Computers Introduction to XML you can download everything free

How can I improve my scores by reading NCERT Solutions in Class 10 Computers Introduction to XML

Regular revision of NCERT Solutions given on studiestoday for Class 10 subject Computers Introduction to XML can help you to score better marks in exams

Are there any websites that offer free NCERT solutions for Introduction to XML Class 10 Computers

Yes, studiestoday.com provides all latest NCERT Introduction to XML Class 10 Computers solutions based on the latest books for the current academic session

Can NCERT solutions for Class 10 Computers Introduction to XML be accessed on mobile devices

Yes, studiestoday provides NCERT solutions for Introduction to XML Class 10 Computers in mobile-friendly format and can be accessed on smartphones and tablets.

Are NCERT solutions for Class 10 Introduction to XML Computers available in multiple languages

Yes, NCERT solutions for Class 10 Introduction to XML Computers are available in multiple languages, including English, Hindi