Do you know that? men (41%) are more likely than are women (37%) to experience an income increase after going freelance. next

Contact Email: teammmrem@yahoo.com

<< All Upwork (oDesk) and Elance Tests << Upwork (oDesk) test answers << Internet Programming category

Test answers for XML 1.0 Test (Fifth Edition) 2016

(65) Last updated: January 27
Upwork (oDesk) • Internet Programming
Questions and answers are regularly updated. Answered and not answered tests questions.

This helps getting job: Hundreds of (cover letter examples , interview questions , profile samples ) • Earn on Upwork (oDesk)
Job assistance: jobs popularityfreelance rates

Popular test answers: HTML, .Net, CSS, English, SEO, Photoshop, iOS, Java, Android, Ruby, Python, JavaScript

See all 6 tests answers updated

Find Upwork (oDesk) and Elance test answers on this website:



Collapse | Expand

65 NOT Answered Yet Test Questions:

(hold on, will be updated soon)
1. Which of the following tags are deprecated in accordance with XHTML DTD?

Answers:

• <code>

• <frameset>

• <fieldset>

• <xmp>

2. The main purpose of XML DOM is to:

Answers:

• write XML DTD.

• write XML Schemas.

• programmatically access and manipulate XML Data.

• parse the XML Data.

3. From the following XML code snippet, the 3D shape cube is to be displayed. Which of the following is the correct code option?

<?xml version="1.0" encoding="ISO-8859-1"?>
<shapes>
     <category type="2D">
     <shape>square</shape>
     </category>
     <category type="3D">
         <shape>cube</shape>
     </category>
</shapes>

Answers:

• xmlDoc.selectSingleNode("//category[@type='3D']").childNodes[0].nodeValue

• xmlDoc.getElementByTagName["//category[@type='3D']"].childNodes[0].nodeValue

• xmlDoc.getElementByTagName("category")[1].childNodes[1].nodeValue

• xmlDoc.getElementByTagName("category")[1].childNodes[0].nodeValue

4. Which of the following is an Xlink Locator attribute?

Answers:

• to

• actuate

• role

• href

5. Which of the following are the mandatory XHTML elements?

Answers:

• <html>

• <head>

• <title>

• <meta>

6. Which of the following XSL component is a language for transforming XML documents?

Answers:

• XSL-FO

• XSLT

• XLink

• XPath

7. Which of the following deals with internationalization and localization of Extended Links?

Answers:

• Resource-Type

• Locator-Type

• Arc-Type

• Title-Type

8. Which of the following operations or applications use XML?

Answers:

• WSDL applications

• Retreiving data from a database using applications

• Ajax

• Browser scripting

9. Which of the following statements is not true of XForms?

Answers:

• Reduced Server round trips

• Form data is submitted in the form of XML.

• XForms are restricted to XHTML.

• It provides multiple device support.

10. The following are two XPath statements:

Statement A: trafficsign[1][@type="warning"]
Statement B: trafficsign[@type="warning"][1]

Answers:

• Statement A selects the first trafficsign node if it has a type attribute with value warning and Statement B selects the first trafficsign node that has a type attribute with value warning.

• Statement A selects the first trafficsign node that has a type attribute with value warning and Statement B selects the first trafficsign node if it has a type attribute with value warning.

• Both statements convey the same meaning.

• Both statements are invalid.

11. Which of the following is not a feature of CDATA sections?

Answers:

• CDATA sections contain character data.

• CDATA sections are not parsed by the XML parser.

• CDATA sections can contain tags and these tags need not be declared in the DTD.

• CDATA sections can be nested.

12. Which of the following are XLink Traversal attributes?

Answers:

• label

• to

• actuate

• from

• title

13. Following the XML Code snippet displays the title of books made by a particular author, using XSLT for each element. The book titles are in sorted order.

1.<xsl:for-each select="author/books">
2.<xsl:sort select="book-title" data-type="text" order="ascending"/>
3.        <tr>
4.                <td><xsl:value of  select="book-title"/></td>
5.           </tr>
6.</xsl:for-each>
On which line will the error occur?

Answers:

• 6

• 4

• 2

• 1

14. Which of the following statements is/are true regarding XForms?

Answers:

• XForm model elements are contained in the head section.

• XForm interface elements are contained in the body section.

• Both a and b are true.

• Neither a nor b is true.

15. Which of the following XML technologies are related to the formatting of XML documents?

Answers:

• XSD

• XSLT

• XForms

• XSL-FO

16. Which of the following are correct XML Namespace declarations?

Answers:

• <body xmlns:hns="http://www.w3.org/TR/html4/">

• <html xmlns='http://www.w3.org/1999/xhtml'>

• <hns:body hns="http://www.w3.org/TR/html4/">

• <hns:body xmlns:hns="http://www.w3.org/TR/html4/">

17. Which of the following is the root element of every XML Schema?

Answers:

• <xmlns:xs>

• <xs:schema>

• <xmlns:xsi>

• None of these

18. Which of the following are examples of XSD Order Indicators?

Answers:

• All

• maxOccurs

• Choice

• minOccurs

19. What does the following DTD imply?

<!DOCTYPE booklist [
<!ELEMENT book (#PCDATA)>
     <!ATTLIST book pages CDATA #IMPLIED>
]>

Answers:

• The book element is required to include an attribute named pages with data type CDATA having a default value of 0.

• The book element may or may not have an attribute called pages.

• The book element is required to include an attribute named pages with data type CDATA but no default value is required.

• The book element is required to include an attribute named pages with data type CDATA and the attribute value is required to have a fixed value.

20. Which of the following are valid DOM methods?

Answers:

• createAttribute()

• setAttribute()

• cloneNodes()

• object()

21. Which of the following statements regarding XML is incorrect?

Answers:

• XML elements must be properly nested.

• XML tags are not case sensitive.

• An XML document must have a root element.

• XML is platform independent.

22. Which of the following is the correct sequence of NodeType value for the following XML elements?

Attribute, Text, Document, Comment

Answers:

• 9,2,3,8

• 3,9,8,2

• 2,3,9,8

• 8,3,9,2

23. Which of the following statements are true in the context of XHTML?

Answers:

• An empty element does not require end tags.

• Elements should be well formed.

• Attribute names must be in the lower case.

• Non-empty elements require end tags.

24. Which of the following is the root element of an XHTML document?

Answers:

• The DOCTYPE declaration

• The <head> tag

• The <html> tag

• The <body> tag

25. Which of the following is a top level element defined in an XSL style sheet?

Answers:

• <xsl:import>

• <xsl:include>

• <xsl:template>

• <xsl:stylesheet>

26. Which of the following DTD attribute-types contains a list of valid XML names?

Answers:

• ID

• NMTOKENS

• CDATA

• ENTITY

27. Which of the following XSD code snippets automatically assigns a value to the shapes element when no value is present?

Answers:

• <xs:element name="shapes" type="xs:string" fixed="square"/>

• <xs:element name="shapes" type="xs:string" default="square"/>

• <xs:element name="shapes" type="xs:string" value="square"/>

• None of these

28. Which of the following filter operators are associated with the <xsl:for-each> element?

Answers:

• =

• !=

• < (less than)

• > (greater than)

• All of the above

29. Which of the following is not a value of the xlink:type attribute?

Answers:

• simple

• embed

• extended

• title

30. Which of the following XPath functions is not a string function?

Answers:

• concat

• substring

• translate

• name

31. Which of the following is the official namespace of XForms?

Answers:

• http://www.w3.org/2007/xforms

• http://www.w3.org/2003/xforms

• http://www.w3.org/2002/xforms

• http://www.w3.org/2001/xforms

32. Which of the following are XForm Built-in Derived Datatypes?

Answers:

• xsd:ID

• xsd:QName

• xsd:NMTOKEN

• xsd:Name

33. Identify the Decendant Nodes in the following XML Code snippet.

<bookstore>
     <book>
           <title>Title1</title>
           <author>Author1</author>
           <year>2009</year>
           <price>10</price>
      </book>
</bookstore>

Answers:

• book

• title

• author

• bookstore

34. Which of the following is a well formed and valid XML document type declaration?

Answers:

• <message>Hello</message>

• <?xml version="1.0"?><message>Hello</message>

• <?xml version="1.0"?><welcome message>Hello</welcome message>

• <?xml version="1.0"?><!DOCTYPE message SYSTEM "message.dtd"><message />

35. Which of the following code snippets does not comply with the XLink syntax?

Answers:

• <mainpage xlink:type="simple" xlink:href="http://dumydomain.com">Main Page</mainpage>

• <mainpage xlink:type="simple" xlink:href="http://dumydomain.com" xlink:show="new">Main Page</mainpage>

• <mainpage xlink:type="simple" xlink:href="http://dumydomain.com" xlink:show="_blank">Main Page</mainpage>

• <mainpage xlink:type="locator" xlink:href="http://dumydomain.com">Main Page</mainpage>

36. From the following XML Code Snippet, the model name of the Mercedes manufacturer is to be displayed. Which of the following options is correct?

<?xml version="1.0" encoding="ISO-8859-1"?>
<cars>
     <car>
           <manufacturer>BMW</manufacturer>
           <model>MT3GTR</model>
       </car>
       <car>
           <manufacturer>Mercedes</manufacturer>
           <model>E-Class</model>
     </car>
   <car>
           <manufacturer>Porche</manufacturer>
           <model>911 Turbo</model>
   </car>
</cars>

Answers:

• xmlDoc.getElementsByTagName("car")[2].childNodes[1].nodeValue;

• xmlDoc.getElementsByTagName("car")[1].childNodes[1].nodeValue;

• xmlDoc.getElementsByTagName("car")[1].childNodes[2].nodeValue;

• xmlDoc.getElementsByTagName("car")[0].childNodes[1].nodeValue;

37. Which of the following is not an XForm Form Control?

Answers:

• output

• button

• range

• trigger

38. Which of the following statements is not true with regard to XML?

Answers:

• XML is used for data exchange between applications on different systems.

• XML is platform independent.

• XML can be used to separate data and presentation.

• XML incorporates relational data structures.

39. What does the following XPath expression depict?

/book/chapter

Answers:

• It displays all chapter elements within the book element.

• It displays the first chapter within the book element.

• It displays the last address within the book element.

40. Which of the following statements comply with the XHTML syntax?

Answers:

• <img src="photo.jpeg" name="photo1" id="photo1" />

• <img src="photo.jpeg" id="photo1" />

• <img src="photo.jpeg" id="photo1">

• <img src="photo.jpeg" name="photo1" />

41. Which of the following XSD data types is supported by XForms?

Answers:

• xsd:duration

• xsd:ENTITY

• xsd:token

• xsd:NOTATION

42. Which of the following XHTML modules defines the elements used in tables?

Answers:

• Forms Module

• Tables Module

• Presentation Module

• Structure Module

43. Which of the following are Tokenized type attributes?

Answers:

• ENTITY

• ID

• CDATA

• NMTOKEN

44. Which of the following is an XForm String function?

Answers:

• property()

• count-non-empty()

• instance()

• index()

45. Select the correct XML from the following options.

Answers:

• <employee><id></id><name></name><department></employee>

• <employee><id><name></id></name><department /></employee>

• <employee><id></id><name></name><department></department></employee>

• <employee><id></id><name></name><department></department>

46. Which of the following is a default value of the show attribute of an XLink?

Answers:

• new

• embed

• replace

• other

47. What does the following DTD imply?

<!DOCTYPE booklist [
    <!ELEMENT booklist(book*)>
    <!ELEMENT book(summary?,title,acknowledgement+)>
    <!ELEMENT summary (#PCDATA)>
    <!ELEMENT title (#PCDATA)>
    <!ELEMENT attachment (#PCDATA)>
]>

Answers:

• The summary element can occur zero or one times inside the book element.

• The acknowledgement element can occur zero or more times inside the book element.

• The book element can occur one or more times inside the booklist element.

• The acknowledgement element can occur one or more times inside the book element.

48. State whether the following statement is True or False.

XForms can contain multiple forms in a single containing document.

Answers:

• True

• False

49. Which of the following is not built-in primitive types in the XML Schema?

Answers:

• xs:string

• xs:integer

• xs:decimal

• xs:boolean

50. Which of the following elements is not associated with XSL?

Answers:

• <if>

• <choose>

• <any>

• <for-each>

51. Which of the following XPath expressions is used to select the parent of the current node?

Answers:

• /

• ..

• .

• //

52. Which of the following XML attributes are correct?

Answers:

• <employee name=Jack>Engineer</employee>

• <employee name='Jack'>Engineer</employee>

• <employee name='Jack "Shelton" Ziegler' />

• <employee name="Jack">Engineer</employee>

53. Which of the following XML DOM object properties returns the root element of an element?

Answers:

• parentNode

• ownerDocument

• nodeName

• tagName

54. Which of the following XPath Boolean functions is used to return the largest integer number that is not greater than the argument of that number?

Answers:

• ceiling

• floor

• round

• number

55. Which of the following statements finds all the dealers where the value of the product attribute is equal to "computers"?

Answers:

• /dealers[@product = "computers"]

• /dealers[product = "computers"]

• /dealers[@product = computers]

• /dealers(@product = "computers")

56. Which of the following statements does not comply with XHTML syntax?

Answers:

• <ul> <li> <ul>Text2</ul> </li> </ul>

• <b><i>This is a test message</i></b>

• <option selected="selected">

• <img src="picture.png" id="picture1" name="picture1" />

57. Which of the following is/are used in Xforms binding?

Answers:

• ref

• XPath

• bind

• All the of the above

58. Which of the following attributes are optional in the xsl:sort command?

Answers:

• select

• case-order

• data-type

• None of the above

59. Which of the following statements is/are true?

Statement (I): Using or following a link for any purpose is called Traversal.
Statement (II): Information about the Trasversal application behaviour is known as Locator.

Answers:

• Statement (I) is true

• Statement (II) is true

• Both (I) and (II) are true

• Neither (I) nor (II) is true

60. Which of the following is not a DTD type attribute?

Answers:

• CDATA

• PCDATA

• IDREFS

• NMTOKEN

61. What is an IDREFS attribute type?

Answers:

• It is a Tokenized type attribute, the same as a ID attribute.

• It is a Tokenized type attribute that contains a list of multiple name tokens.

• It is a Tokenized type attribute that is a list of other ids.

• It is a Tokenized type attribute that is used as a reference to more than one element.

62. Which of the following XSD Constraints is used to define the exact sequence of acceptable characters?

Answers:

• totalDigits

• fractionDigits

• enumeration

• pattern

63. What type of restriction is exhibited by the following XSD code snippet?
<xs:element name="character">
        <xs:simpleType>
             <xs:restriction base="xs:string">
                     <xs:pattern value="[a-z]"/>
             </xs:restriction>
         </xs:simpleType>
</xs:element>

Answers:

• The character element accepts only LOWERCASE letters from a to z.

• The character element rejects all LOWERCASE letters from a to z.

• The character element accepts only ONE of the LOWERCASE letters from a to z.

• The character element accepts all LOWERCASE letters except a and z.

64. Which of the following are XForm Notification Events?

Answers:

• xforms-select

• xforms-ready

• xforms-focus

• xforms-valid

65. Identify the values of the text nodes in the following XML Code Snippet?

<?xml version="1.0" encoding="ISO-8859-1"?>
<books>
       <book category="science">
       <title>Solar System</title>
         <chapters>12</chapters>
     </book>
</books>

Answers:

• <title>

• Solar Sytem

• <chapters>

• 12