0% found this document useful (0 votes)
447 views8 pages

CS311 Midterm 2019

The document provides information about joining a Facebook group for VU help and contains sample questions that may appear on a CS311 midterm exam. It includes 25 multiple choice questions testing XML knowledge, covering topics like XML structure and syntax, well-formed documents, elements, attributes, DTDs, and more. The last part discusses creating a new element or attribute in PHP code and displaying XML.

Uploaded by

nomannomi1911
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
447 views8 pages

CS311 Midterm 2019

The document provides information about joining a Facebook group for VU help and contains sample questions that may appear on a CS311 midterm exam. It includes 25 multiple choice questions testing XML knowledge, covering topics like XML structure and syntax, well-formed documents, elements, attributes, DTDs, and more. The last part discusses creating a new element or attribute in PHP code and displaying XML.

Uploaded by

nomannomi1911
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Rana Abubakar Khan

If you want to learn computer programming then contact with me

[email protected]

JOIN FB GROUP FOR VU HELP


www.facebook.com/groups/vu1234/
CS311 Mid Term Past Paper

CS311 17-JUNE-2019

1-define entities < > & in reference relation in xml. 3 marks

2-in xml open() function has 3 arguments define each value and usage. 3 marks

3-write xml document for the following tree image uploaded. 5 marks

4- i)create element "bowler", ii)create attribute "age" set value 35. 5 marks

5- create xml document of following

<?xml version="1.0" encoding="UTF-8" ?>

<country>

<city> lahore</city><city>islamabad</city>

.......

</country>

here .... means more cities which are saved in php array $cities.

1
1. What does XML stand for?
 eXtensible Markup Language
 eXtra Modern Link
 Example Markup Language
 X-Markup Language

2. There is a way of describing XML data, how?


 XML uses a DTD to describe the data
 XML uses XSL to describe data
 XML uses a description node to describe data

3. XML's goal is to replace HTML


 False
 True

4. What is the correct syntax of the declaration which defines the XML version?
 <xml version="1.0" />
 <?xml version="1.0" />
 <?xml version="1.0"?>

5. What does DTD stand for?


 Document Type Definition
 Dynamic Type Definition
 Do The Dance
 Direct Type Definition

6. Is this a "well formed" XML document?


<?xml version="1.0"?>
<note>

2
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
 Yes
 No

7. Is this a "well formed" XML document?


<?xml version="1.0"?>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
 Yes
 No

8. Which statement is true?


 All the statements are true
 All XML elements must be properly closed
 All XML documents must have a DTD
 All XML elements must be lower case

9. Which statement is true?


 All the statements are true
 XML documents must have a root tag
 XML tags are case sensitive
 XML elements must be properly nested

10. XML preserves white spaces

3
 False
 True

11. Is this a "well formed" XML document?


<?xml version="1.0"?>
<note>
<to age="29">Tove</to>
<from>Jani</from>
</note>
 Yes
 No

12. Is this a "well formed" XML document?


<?xml version="1.0"?>
<note>
<to age=29>Tove</to>
<from>Jani</from>
</note>
 No
 Yes

13. XML elements cannot be empty


 True
 False

14. Which is not a correct name for an XML element?


 <h1>
 <1dollar>
 <Note>
 All 3 names are incorrect

4
15. Which is not a correct name for an XML element?
 All 3 names are incorrect
 <first name>
 <age>
 <NAME>

16. Which is not a correct name for an XML element?


 All 3 names are incorrect
 <xmldocument>
 <7eleven>
 <phone number>

17. XML attribute values must always be enclosed in quotes


 False
 True

18. What does XSL stand for?


 eXtra Style Language
 eXtensible Stylesheet Language
 eXtensible Style Listing
 eXpandable Style Language

19. What is a correct way of referring to a stylesheet called "mystyle.xsl" ?


 <?xml-stylesheet type="text/xsl" href="mystyle.xsl" ?>
 <link type="text/xsl" href="mystyle.xsl" />
 <stylesheet type="text/xsl" href="mystyle.xsl" />

20. For the XML parser to ignore a certain section of your XML document, which syntax is
correct?
 <CDATA> Text to be ignored </CDATA>
 <xml:CDATA[ Text to be ignored ]>

5
 <PCDATA> Text to be ignored </PCDATA>
 <![CDATA[ Text to be ignored ]]>

21. Which statement is true?


 Attributes must occur in defined order
 None of the statements are true
 Attributes must always be present
 Both statements are true

22. What are XML entities used for?


 Entities define shortcuts to standard attributes
 Entities define shortcuts to standard text or special characters
 Entities define shortcuts to standard elements

23. Which of the following XML fragments is well-formed?


 <customer id=3456><name>John Smith</name></customer>
 <customer id="3456"><address/><zip code="3456"/></customer>

24. What is an XML instance?


 An XML element
 An XML attribute
 An XML document

25. Which XML DOM object represents a node in the node tree?
 The nodeList object
 The node object
The document object

………………………………………………….

6
Question no 1
During a server request, the readyState changes from 0 to 4:
Question no 2
replacement-entity of > , < , or &
Question no 3
Create new element node

What is Valid XML document Status of 404 and 200 difference batanna tha Difference between XML and xhtml
PHP ma xml ka code Tha wo diaply karwanna tha Ak last Tha new element or attribute create Karna thq

REPLY BY MUHAMMAD UMER ON DECEMBER 10, 2017 AT 8:14PM

Question no 1

During a server request, the readyState changes from 0 to 4:

Question no 2

replacement-entity of > , < , or &

Question no 3

Create new element node

7
8

You might also like