Showing posts with label #पढोOnline. Show all posts
Showing posts with label #पढोOnline. Show all posts

XML Tutorial : Part-Two


1. Which of the following parses the document by loading the complete contents of the document and creating its complete hierarchical tree in memory?
A.      Dom Parser
B.      SAX Parser
C.      JDOM Parser
D.      StAX Parser

2. What DOM stands for?
A.      Direct Object Model
B.      Document Object Model
C.      Document Object Modelling?
D.      Document Output Model

3. Which component of JDOM Parser represents DOM tree?
A.      Document
B.      Element
C.      Attribute
D.      Text

4. Which method of JDOM Parser builds the JDOM Document from the XML source?
A.      SAXBuilder, build (xmlSource)
B.      Document.getRootElement()
C.      Node.getRootElement()
D.      Node.getChild(Name)


5. XPath is one of the major element in XSLT standard and is must have knowledge in order to work with XSLT documents.
A.      False
B.      True


6. Which of the following XPath expression ensures that selection starts from the root node?
A.      .
B.      /
C.      ./
D.      .//


7. Which of the following is true about Node Class of the DOM4J parser?
A.      It represents the entire xml documents. A documents object is often reffered to as a DOM tree.
B.      It represents an XML element. Element object has methods to manipulate its child elements, its text, attributes and namespaces.
C.       It represents an attribute of an element. Attribute has method to get and set the value of attribute, it has parent and attribute type.

8. What is XML Parsing?
A.      Parsing xml refers to going through xml documents to access data or to modify data in one or other way.
B.      Parsing XML refers to creation of XML documents.
C.      Both of the above
D.      None of the above

9. What is a StAX Parser?
A.      StAX is a JAVA based PULL API to parse XML document
B.      It is very quick API and uses streams
C.      Both of the above
D.      None of the above

10. Which of the following predicate selects the first student element that is the child of the class element?
A.      /class/student/[1]
B.      /class/student[last()]
C.      /class/student[first()-]
D.      None of the above


Previous------------------------Next


XML Tutorial: Part-One

Question
View Answer
1. What is markup language?
2.What is XML?
3.What are the features of XML?

4.What are the difference between HTML and XML?
5.Which tag is used to find the version of XML and the syntax?
6.What is XML DOM document?
7.What is XPath?
8.What is attribute?
9. Can we have empty XML tags?

10. What are the advantages of XML DOM document?
11. What is well formed XML document?
12. What is an XML schema ?
13. Who is responsible for XML?
14. What is XSL?
15. What is XML Parser?
16. What are XML Namespaces?
17. How comment can be represented in XML?
18. What is CDATA?
19. What is XML element?
20. What are the basic rules while writing XML?
21. What is X Link and X Pointer?
22. What is XQuery?
23. What are nested elements in XML?
24. Why XST is important for XML?
25. What is DTD?
26. What are the disadvantages of XML?
27. What are benefit of XML?
28. How can I include conditional statement in XML?
29. Can I replace HTML and XML?
30. Whether graphics can be included in XML? If so, how?
31. What software is available for XML?
32. What are the special characters used in XML?
33. Can I execute a XML?
34. What is SGML?
35. Why XML has been used for development?
36. Why XML editor is needed instead of Notepad?
37. What is XML encoding ?
38. Which XML is set to be valid XML?
39. What is simple element?
40. What is complex element?
41. Is there a way to describe XML data?
42. What are the three parts of XSL?
43. What is correct syntax when we define XML version?

44. If XML attribute name itself has double quotes, then how it can be represented?
45. What are the types of XML parser?
46. Whether root element is required for XML? If so, how many root elements are required?
47. What is XML signature?
48. What is data Island?
49. What is DiffGram in XML?
50.What is SAX?

Improve Your XML Ability :PART-4

36. Why XML editor is needed instead of Notepad?
XML editors are required to write error free XML documents, and it is used to validate against DTD or schema. Editors are able to check:
• Open and Close Tags
• XML against DTD
• XML against Schema
• Color code on XML Syntax
37. What is XML Encoding?
XML documents may contain Non-ASCII characters like French and Norwegian characters. XML Encoding is used to avoid errors and XML files have to be saved as Unicode.
38. Which XML is set to be valid XML?
When the XML file is validated against the Document Type Definition(DTD), then it is called valid XML. DTD is nothing but it defines the structure of an XML file.
39. What is Simple Element?
A simple element contain only text and following are the kinds of Simple Element:
·          No attributes
·          Doesn’t contain other elements
·          It cannot be empty
40. What is Complex Element?
A complex element contain other elements or attributes and following are kinds of Complex Elements:
·          It has empty elements
·          It contain other elements
·          It contain only text
·          It contain both other elements and text
41. Is there a way to describe XML data?
Yes, XML uses Document Type Definition (DTD) to describe the data.
42. What are the three parts of XSL?
XSL consists of three parts:
·          XSLT – Used to transform XML documents
·          XPath – Used for navigating in XML documents

·          XSL-FO – Used for formatting XML documents

43. What is the correct syntax when we define XML version?

1
<?xml version=”1.0”/>

is the correct declarative syntax used to define XML version.
44. If XML attribute name itself has double quotes, then how it can be represented?
Attribute name can be represented within single quotes if double quotes are present in the attribute name.
Example –

1
 <country city='Texas "US"'></country>

45. What are the types of XML Parsers?
There are two types of parsers – Non-Validating and Validating Parsers. Name itself implies Non-Validating will not validate the XML and Validating parser will validate the XML with DTD.
46. Whether root element is required for XML? If so, how many root elements are required?
Yes, root element is required, and it can have only one root element in each XML.
47. What is XML Signature?
XML Signature is recommended by W3C, and it acts as a digital signature for XML documents. If the signature is contained outside the document, it is called detached signature. If it contains inside the XML document, then it is called Enveloping signature.
48. What is Data Island?
An XML Data island is XML data embedded into a HTML page. This works only with the Internet.
49. What is DiffGram in XML?
A DiffGram is an XML format which is used to find current and original versions of XML document.
50. What is SAX?
SAX is an interface processing XML documents using events.


Previous-------------------------------Next

Improve Your XML Ability : PART-3

21. What is XLink and XPointer?
XLink is the standard way of creating hyperlinks in the XML files. Xpointer which allows those hyperlinks to point to more specific parts of the XML file or document.

22. What is XQuery?
XQuery was designed to query XML data which is nothing but SQL for database tables. XQuery is used to fetch the data from the XML file.
23. What are nested elements in XML?
If one or more elements are nested inside the root element is called nested element. Nesting can be easy to understand and also keeps order in an XML document.
24. Why XSLT is important for XML?
XSLT is abbreviated as eXtensible Sytlesheet Language Transformation which is used to transform an XML document to HTML before it is displayed to the browser.
25. What is DTD?
DTD is abbreviated as Document Type Definition and it is defined to build legal building blocks of an XML document. It defines the XML document structure with elements and attributes.
26. What are the disadvantages of XML?
Following are the disadvantages of XML:
• XML will be just a text file if elements and attributes are not defined properly.
• Overlapping markup is not permitted
27. What are the benefits of XML?
Benefits of XML are
• Simple to read and understand
• XML can be done with a text editor
• Extensibility – No fixed tags
• Self – descriptive
• Can embed multiple data types
28. How can I include conditional statements in XML?
We cannot include conditional statement as like programming language.
<foo if{DB}="A">bar</foo>
This can be done by using Document Type Definition(DTD
<xsl:if test="@foo=’bar’">

<xsl:text>Hello, world!</xsl:text>

</xsl:if>


29. Can I replace HTML with XML?
No, XML is not a replacement of HTML. XML provides an alternative approach to define own set of markup elements, and it is used for processing and storing data.

30. Whether graphics can be used in XML? If so, How?
Yes, Graphics can be included in XML by using XLink and XPointer specifications. It supports graphic file formats like GIF, JPG, TIFF, PNG, CGM, EPS and SVG.
XLink:
<description

xlink:type="simple"

xlink:href="http://show.com/Cinema.gif"

xlink:show="new">

</description>

XPointer:

<description

xlink:type="simple"

xlink:href="http://show.com/Cinema.gif#Shownumber"

xlink:show="new">

</description>


31. What software is available for XML?
There are thousands of programs available for XML and updated list will be present in http://xml.coverpages.org.

32. What are the special characters used in XML?
<, > and & are the special characters used in XML. Because these characters are used for making tags.

33.Can I execute a XML?
No, we cannot execute XML, and it is not a programming language to execute. It is just a markup language to represent the data.
34. What is SGML?
SGML is large and powerful Standard Generalized markup Language which is used to define descriptions of the structure of different types of electronic document.

35. Why XML has been used for development?
XML is used for development for following reasons:
• Used for Database driven websites
• Used to store data for e-commerce websites
• Used to transport and store data on internet


• XML is used for database and flat files
• Generate dynamic content by applying different style sheets


Previous------------------------Next