XML/XML Mcq Question Set 5 Sample Test,Sample questions

Question:
<? xml version="1.0"?> tag is mandatory

1. True

2. False

3.all of the above

4.None of the mentioned


Question:
.appendChild(newnode) can appends a node at any position

1. True

2.False

3.all of the above

4.None of the mentioned


Question:
.cloneNode(false)

1.Copies whole structure

2.Copies only the current node

3. Copies all leaf nodes

4. None of the above


Question:
.cloneNode(True)

1.Copies whole structure of the current node along with sub tags and data

2.Copies only the current node

3.Copies all leaf nodes

4. None of the above


Question:
A new node can be inserted anywhere in an XML file

1. True

2.False

3.all of the above

4.None of the mentioned


Question:
An .................... block can be to embed a CSS style sheet within an XML document.

1.<bk:Book>

2.<Element Type>

3.<HTML:STYLE>

4.<XML:STYLE>


Question:
Cascading style sheet can be

1.External, Inline

2. Internal, External

3. Internal, External, Inline

4.External only


Question:
Data type is applied in an XML file using

1.dt:dt

2.dt:type

3. data:type

4. dt:data:type


Question:
DTD follows

1. Bottom Up approach

2. Top Down approach

3.all of the above

4.None of the mentioned


Question:
DTD stands for Data Type Definition

1. True

2.False

3.all of the above

4.None of the mentioned


Question:
Elements from the HTML namespace are displayed as they would in ...............

1.DHTML

2.XML

3.HTML

4.DXML


Question:
Extension of a Schema file and an XML file is same

1.True

2.False

3.all of the above

4.None of the mentioned


Question:
For internal DTD __________ is not required

1. DOCTYPE

2. SYSTEM

3.ELEMENT

4.#PCDATA


Question:
If "centre" is an attribute of a tag, then in Schema use __________ to validate it.

1. <AttributeType="centre"/>

2. <AttributeType="centre">

3. <attribute type="centre">

4. <attribute type="centre"/>


Question:
If a node is replaced, it is reflected on the file itself

1. True

2.False

3.all of the above

4.None of the mentioned


Question:
If DTD file is used, it always validates an XML file irrespective of how the XML file is retrieved

1.True

2.False

3.all of the above

4.None of the mentioned


Question:
If two styles are mentioned as
p{ color:blue }
p.abc{ color:red } and paragraph tag is used as <p class=abc>Hello World</p> then

1. The color of Hello World will be red

2.The color of Hello World will be blue

3.The color of Hello World will be the default color ie. Black

4. None of the above


Question:
In DTD to specify an Attribute List use

1. <ATTLIST student centre (MintoPark|Gariahat|CamacStreet) "MintoPark">

2. <ATTLIST student (MintoPark|Gariahat|CamacStreet) "MintoPark">

3.<!ATTLIST student centre (MintoPark|Gariahat|CamacStreet) "MintoPark">

4.<!ATTLIST student (MintoPark|Gariahat|CamacStreet) "MintoPark">


Question:
In DTD to validate that a tag can have only text use

1.<!ELEMENT name (PCDATA)>

2. <!ELEMENT name (#PCDATA)>

3.<!ELEMENT name (#DATA)>

4. <!ELEMENT name (DATA)>


Question:
In Schema Attribute list can be set to any element

1.True

2. False

3.all of the above

4.None of the mentioned


Question:
In Schema data type can be specified using

1.dataType

2.type

3.dt:type

4. data:type


Question:
In Schema to validate that an element can contain only Text use

1.content="textOnly"

2.content="text"

3. content="#PCDATA"

4. content="DATA"


Question:
In XML all attribute values must be quoted ie. center="MP"

1. True

2.False

3.all of the above

4.None of the mentioned


Question:
In XML tags can be closed in any order

1. True

2. False

3.all of the above

4.None of the mentioned


Question:
Latest version of XML is _______

1. 1.0

2.2.0

3.3.0

4.4.0


Question:
Schema and DTD can be used together

1. True

2.False

3.all of the above

4.None of the mentioned


Question:
Schema follows

1. Top down approach

2.Bottom up approach

3.Closed model

4.None of the mentioned


Question:
The correct tag is

1.<?xml version="1.0"?>

2. <?xml version "1.0"?>

3. <xml version="1.0">

4. <xml version "1.0">


Question:
The valid Schema tag is

1.<Element Type="roll" minOccurs="1" maxOccurs="1"/>

2. <element type="roll" minOccurs="1" maxOccurs="1"/>

3.<ElementType="roll" minOccurs="1" maxOccurs="1"/>

4.<Element Type="roll" minOccurs="1" maxOccurs="1"/>


Question:
To arrange names in descending order in XSL, use

1. Order-by="name"

2. Order-by="+name"

3. Order-by="-name"

4.Order-by="name" desc


Question:
To insert a node use

1. insert

2.insertAfter

3. AddNew

4. InsertBefore


Question:
To match a particular record use

1.match=".[centre='MP']"

2. match=".[centre=MP]"

3. match=".[@centre='MP']"

4. match=.[@centre='MP']


Question:
To retrieve a value stored in a attribute declared in a DTD file _________ is used

1. &attribute name;

2.&attribute name

3. attribute name

4. &attribute name;*


Question:
To select a particular node __________ is used

1. select

2.selectNodes

3. selectNode

4. selectedNodes


Question:
To select all the names whose salary is above 10000 use

1........…/nodename/name[salary>10000]

2.....…/nodename.nodes/name[salary>10000]

3.....…/nodename[salary>10000]/name

4.....…/nodename[salary>10000].nodes/name


Question:
To select the first node using XPointer use

1............…/nodename[0]

2.....…/nodename[1]

3.....…/nodename[0].nodes

4........…/nodename[1].nodes


Question:
To specify a list of Attributes in Schema use

1.dt:type="list"

2. dt:type="enumeration"

3.dt:type="enum"

4.dt:type="values"


Question:
To stop processing external files in XML use

1.resolveExternal = false

2. resolve = false

3. resolvcExternal = false

4. resolveExternals = false


Question:
Use _________ to specify an Attribute list

1.ATTLST

2.ATTLIST

3.ATTRIBUTE

4.Lists


Question:
var xmlDoc=new ActivexObject ("Microsoft.xmldom"); Here xmldom is

1.Name of object

2.Name of component

3.Name of class

4.none of the above


Question:
Which one is used to mention the values Attribute list

1.dt:values="MintoPark CamacStreet Gariahat"

2. dt:values="Minto Park Camac Street Gariahat"

3. dt:values="Minto Park, CamacStreet, Gariahat"

4.dt:values="MintoPark | CamacStreet | Gariahat"


Question:
XML is case sensitive

1.True

2.FALSE

3.all of the above

4.None of the mentioned


Question:
XML is preferred over HTML because

1. The GUI is embedded in the data

2.Searching for information in the data is tough

3. Data is tied to the logic and language of HTML

4. All of the above


Question:
__ is used to define the addressing mechanism while ________ is provides a standard way to use that mechanism in references

1.XPointer, XPath

2. XPath, XPointer

3. XPath, Xlink

4. XQuery, Xlink


Question:
___ is used inXML documents to block off text that are to be side stepped by an XML parser

1. CDATA

2.<!-- -- >

3. //

4. /* */


Question:
_____ can be used to filter tags

1.apply-templates

2.select

3. Any one of the above

4. Both of the above


Question:
______ removes a child node

1..removeChild(nodename)

2. .remove(nodename)

3..removeChild(nodename, reference)

4. .remove(nodename, reference)


Question:
_______ appends a child

1. .append (newnode)

2. .appendChild(newnode)

3. .append(newnode, ,reference_node)

4. .appendChild(newnode,reference_node)


Question:
_______ is used for comment in XML

1.CDATA

2. <!-- -- >

3. //

4. /* */


Question:
_______ replaces a child node

1. .replace(nodename)

2..replaceChild(nodename)

3. .replace(nodename, reference)

4. .replaceChild(nodename, reference)


More MCQS

  1. XML Mcq Question Set 1
  2. XML Mcq Question Set 2
  3. XML Mcq Question Set 3
  4. XML Mcq Question Set 4
  5. XML Mcq Question Set 5
  6. XML Multiple Choice Questions
  7. XML MCQ
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!