Upwork Test Answers: Get all the correct answers of most recent and possible Upwork Tests A to Z (Updated on Jan, 2016)
Cover Letter Templates: These cover letter samples are not only for Upwork job, but also you will have some idea about your real life job
 
Freelance Profile Overviews: Different Profile samples and overviews of experts, advanced and intermediate level freelancers
For Newbie of Upwork: Upwork Help - How to apply for a job in Upwork with 10 most important articles about Upwork

A to Z View - All Upwork Test Answers

XML 1.0 Test Answers (new)

In this post, you will have most recent Upwork test questions and answers of XML 1.0 test for Upwork Internet Programming category.

Search your desired answers of the Upwork XML 1.0 Test by pressing Ctrl + F button.
-------------------------------------------------------------------------------------------------------------------


1. Which of the following can store negative values?
 Answers: • int or • i1 or • i2

 2. Which of the following attributes are optional in xsl:sort command?
 Answers: • Select or • order or • datatype

 3. Which of the following are methods of formatting of XML documents?
 Answers: • DTD or • Schema

 4. Which of the following data types are allowed in xsl:sort command?
 Answers: • Text or • Number

 5. Which of the following patterns are correct for 'select' attribute
 of xsl:sort command?
 Answers: • / for the root node or • @* for any parent node

 6. Which elements in the following extract contain Mixed Content?

 1 <?xml version="1.0"?>
 2 <folder>
 3 <file>
 4 <name>Accounts Reports</name>
 5 <contents>These are the contents of the file
 6 <report>This is the first report</report>
 7 </contents>
 8 End of the file
 9 </file>
 10 </folder>
 Answers: • file or • contents

 7. Which element in the following extract contains Simple Content (Text Content)?

 1 <?xml version="1.0"?>
 2 <folder>
 3 <file>
 4 <name>Accounts Reports</name>
 5 <contents>These are the contents of the file
 6 <report>This is the first report</report>
 7 </contents>
 8 End of the file
 9 </file>
 10 </folder>
 Answers: • name or • report

 8. What are the possible values for the actuate attribute of an XLink?
 Answers: • onLoad or • onRequest

 9. Which of the following statements is not correct about schema?
 Answers: • The Schema element can contain any number of top-level declarations

 10. Which of the following is an invalid operator?
 Answers: • None of the above

 11. When is the DOM event 'onreadystatechange' fired?
 Answers: • When the readyState method changes

 12. What are the requirements for an Extended XLink element?
 Answers: • You must specify at least two locators and one arc

 13. Is the following statement correct?
 You can use XSL Transformations (XSLT) to merge simple regular XML data with an HTML template for display.
 Answers: • Yes

 14. What is the Root element of an XSL file?
 Answers: • The stylesheet element

 15. What does the following XPath expression represent?

 /addressbook/address[@id='1']
 Answers: • The address having an id attribute with a value of 1

 16. Select the appropriate statement to find all books that have an
 excerpt and a title.
 Answers: • book[excerpt][title]

 17. Which line will generate an error in the following XML file?

 1.<?xml version="1.0"?>
 2.<folder>
 3.<file><name><contents></contents></name></file>
 4.<file><name/><contents></contents><name/></file>
 5.<file><name/><contents></contents></name></file>
 6.<file><name><contents/><name/></file>
 7.</folder>
 Answers: • 4,5,6

 18. Which of the following is an attribute of the locator element in an Extended XLink?
 Answers: • href

 19. What are the relative advantages of Schemas over DTDs?
 Answers: • All of the above

 20. Which is the correct method for declaring the xml version?
 Answers: • <?xml version="1.0"?>

 21. Which line will generate an error in the following XML code?

 1 <?xml version="1.0"?>
 2 <f_ns:folder dt="1/1/2000">
 3 <file f_id="1" >
 4 <name>Accounts Reports</name>
 5 <contents />
 6 <!-- Note: This file does not contain anything yet -->
 7 </file>
 8 </f_ns:folder>
 Answers: • 5

 22. Select the appropriate statement to find all bookstores where the
 value of the specialty attribute is equal to "textbooks".
 Answers: • /bookstore[@specialty = "textbooks"]

 23. How is an External Unparsed General entity defined in a DTD?
 Answers: • <!ENTITY entity-name SYSTEM "file-name" NDATA notation-name>

 24. What are the possible values for the show attribute of an XLink?
 Answers: • All of the above

 25. State whether the following statement is correct?
 Attributes must have both a name and a value.
 Answers: • True

 26. State whether the following statement is correct?
 XPath can be used directly from the Document Object Model (DOM).
 Answers: • False

 27. Which of the following are XHTML DTDs?
 Answers: • All of the above

 28. Which of the following is not a parameter of DOM event ontransformnode?
 Answers: • nodeType

 29. Which limitation of HTML links is overcome by XLink?
 Answers: • HTML links only allow navigation in one direction

 30. What does the following XPath expression represent?

 /addressbook//phone
 Answers: • All phone elements that are present beneath the addessbook element (at any level)

 31. What does depth method of DOM do?
 Answers: • Returns the depth of attributes

 32. Which of the following statements are true about the number data
 type in xml?
 Answers: • can store integer and decimal values

 33. Choose the correct DTD Element definition:
 Answers: • <!ELEMENT country (#PCDATA)>

 34. Which of the following statements is true with regard to XHTML?
 Answers: • XHTML tags are different from HTML tags

 35. Which of the following is not an advantage of DOM?
 Answers: • Retrieves small amounts of information

 36. CDATA sections provide a way to tell the parser that there is no
 markup in the characters contained by the CDATA
 section. Which of the following is the correct syntax for CDATA?
 Answers: • <![CDATA[applications with XML using <, >,]]>

 37. Which of the following is not a type of attribute?
 Answers: • ID

 38. Which of the following XPath functions is not a string function?
 Answers: • namespace-uri

 39. Which of the following is not a DOM method?
 Answers: • object

 40. Which of the following is not an XSL element?
 Answers: • select

 41. What does the following DTD imply?

 <!DOCTYPE messagelist [
 <!ELEMENT messagelist(message*)>
 <!ELEMENT message(sender?,receiver,subject,body,attachment+)>
 <!ELEMENT sender (#PCDATA)>
 <!ELEMENT receiver (#PCDATA)>
 <!ELEMENT subject (#PCDATA)>
 <!ELEMENT body (#PCDATA)>
 <!ELEMENT attachment (#PCDATA)>
 ]>
 Answers: • There need not be any attachments

 42. Which element in the following extract contains Element Content?

 1 <?xml version="1.0"?>
 2 <folder>
 3 <file>
 4 <name>Accounts Reports</name>
 5 <contents>These are the contents of the file
 6 <report>This is the first report</report>
 7 </contents>
 8 End of the file
 9 </file>
 10 </folder>
 Answers: • folder

 43. What does the following XPath expression represent?

 /addressbook/*/phone
 Answers: • This is an incorrect expression

 44. What are XML Namespaces used for?
 Answers: • They prevent element naming conflicts when more than one XML vocabulary is being used in an XML document

 45. What is the purpose of XPointer?
 Answers: • It is used when you want a link to point to a particular part of an XML document

 46. State whether the following statement is correct?
 Conditional templates are output only if certain conditions exist
 within the source document.
 Answers: • True

 47. Is the following statement correct?
 Inner tags in XML must be closed first.
 Answers: • True

 48. An XML document has a root element named <folder>. The DTD for this document is stored in an External file called folder.dtd. How will you declare this external DTD in the XML document?
 Answers: • <!DOCTYPE folder SYSTEM "folder.dtd">

 49. Which of the following statements is true?
 Answers: • An XML Namespace can only be associated with the Root element of an XML document

 50. How is an entity used within an XML document?
 Answers: • <!--entity-name-->

 51. Read the following statements carefully.
 1. <xsl:for-each select="portfolio/stock">
 2. <TR>
 3. <TD><xsl:value-of "symbol"/></TD>
 4. </TR>
 5. </xsl:for-each>

 Which statement is incorrect in above rows?
 Answers: • 3

 52. State whether the following statement is correct?
 Inline schema is useful when it is inconvenient to physically separate
 the schema and the instance.
 Answers: • True

 53. When is the DOM event 'ondataavailable' fired?
 Answers: • When new data is available

 54. What is wrong with this XML code?

 1 <?xml version="1.0"?>
 2 <folder dt="1/1/2000">
 3 <file id="1" >
 4 <name>Accounts Reports</name>
 5 <contents />
 6 <!-- Note: This file does not contain anything yet -->
 7 </file>
 8 </folder>
 9 <folder dt="1/2/2000">
 10 <file id="2" >
 11 <name>Marketing Reports</name>
 12 <contents />
 13 <!-- Note: This file does not contain anything yet -->
 14 </file>
 15 </folder>
 Answers: • it doesn't have a root element

 55. Which of the following is false when you use XSL to convert an XML document to HTML format?
 Answers: • The document generated after transformation will also satisfy all XML syntax requirements

 56. Which of the following is correct about SAX2?
 Answers: • SAX2 is used for event-based xml implementation

 57. Which is the correct way to declare an XML Namespace?
 Answers: • <body xmlns:hns="http://www.w3.org/TR/html4/">

 58. Which of the following statements define 'prolog' in xml?
 Answers: • The prolog creates is used to create the structure of the xml document

 59. When are you most likely to use XML?
 Answers: • You have created a Java-based data-oriented application which will be used on several different platforms

 60. What is an ENTITY attribute type?
 Answers: • It can contain the name of any External Unparsed entity

 61. Which of the following is an XML declaration?
 Answers: • <?xml version="1.0"?>

 62. Which of the following is not a reason for using DTDs?
 Answers: • DTDs speed up the parsing of an XML document

 63. What is an IDREFS attribute type?
 Answers: • It can contain letters and numbers and it must contain unique values

 64. Which of the following is the correct way to define an attribute named size of an element named shoe. The attribute should have a default value of 0?
 Answers: • <!ATTLIST shoe size CDATA 0>

 65. Which attribute is not used when specifying a Simple XLink element?
 Answers: • locator

 66. What is an NMTOKEN attribute type?
 Answers: • It can only contain letters and digits, hyphens, colons and a few other characters including spaces

 67. Which of the following are the elements used to define an XML Schema?
 Answers: • attribute

 68. Which of the following is not an attribute of AttributeType
 element of schema?
 Answers: • optional

 69. What is the difference between General entities and Parameter Entities?
 Answers: • Parameter entities are used within DTDs and General entities are used within XML documents

 70. What is XML DOM used for?
 Answers: • Programmatically accessing the elements within an XML file

 71. What is an ID attribute type?
 Answers: • It can only contain numbers and it must contain unique values

 72. Select the correct XML from following options.
 Answers: • <Customers><Customer><ID></ID><Customer><Customer><Name></Name></Customer></Customer></Customer></Customers>

 73. What is the correct value of order attribute for sorting the
 string in ascending order?
 Answers: • ascending

 74. What does the following XPath expression represent?

 /addressbook/address
 Answers: • All addresses within the addressbook element

 75. When are you likely to use an XML Namespace?
 Answers: • All of the above

 76. Which of the following is a required namespace in xml schema?
 Answers: • None of the above

 77. Comments describe statements in a better way. What is the correct syntax of comments in XML?
 Answers: • Begin with <!-- and end with -->

 78. Which of the following is not a schema element?
 Answers: • Attribute

 79. Which of the following is not a primitive data type?
 Answers: • date

 80. Which of the statements are correct?

 (a)Attributes added with <xsl:attribute> must appear before children are added to the element.
 (b)You can add an attribute to an element that already has an attribute of that name.
 Answers: • Only (a) is true