The largest Interview Solution Library on the web


Interview Questions
« Previous | 0 | 1 | 2 | 3 | 4 | Next »

21.How do I control formatting and appearance?

One of the advantages of XML over HTML is that, it allows you to define your own tag set. To use the tags you have to create a style sheet, which is used to display the formatted text. The formatting and appearance will be implemented using the style sheet. The style sheet will be displayed on the browser in the format which you have specified.

22.What are the related specifications of XML?

XML stands for Extensible Markup language which is designed to transport and store data. The related specification of it as follows:
- XML Namespaces: allows easy to store XML elements and attributes for a document.
- XML Base: set the base for resolution of relative URI references. It defines xml:base attribute.
- XML information/infoset: describes an abstract data model for XML documents.
- XPath: defines a syntax which identifies one or more internal components (elements, attributes, etc) included in XML document.
- XSLT: is a language with an XML-based syntax that is used to transform XML documents into XML or other formats.
- XQuery: allows easy to use methods to access, manipulate and return XML in XML databases.
- XML Signature/Encryption: defines syntax and processing rules for creating and encrypting digital signatures on XML content.

23.What is Document Object Model? Why it is used?

Document Object Model also known as DOM, is an application programming interface that allows navigation through objects. The documents are treated as objects. DOM documents are either created by a parser or generated manually by users. DOM requires large portion of memory, as the entire document has to be loaded before any access to it, can be made.

24.What is a markup language?

Markup languages are designed for presentation of text in different formats, and it can also be used for transporting and storing data. This markup language specifies the code for formatting, layout and style of data .This markup code is called Tag.

HTML and XML are examples of Markup Language.

25.What are the features of XML?

Main features of XML are:

  • Very easy to learn and implement
  • XML files are text files, and no editor is required
  • Minimal and a limited number of syntax rules in XML
  • It is extensible, and it specifies that structural rules of tags

26.Which tag is used to find the version of XML and the syntax?

Declaring the XML version is very important for each XML document and platform needs to be specified in which it is running.

<?xml version=”1.1” encoding=”|ISO-8859-1|”?>

27.What is XML DOM Document?

XML Document object represents the whole XML document, and it is the root of a document tree. It gives access to entire XML document – Nodes and Elements, and it has its own properties.

28.What is XPath?

XPath is used to find information in an XML document and contains standard functions. XPath is the major element in XSLT, and it is w3c recommendation.

29.What is an attribute?

An attribute provides more or additional information about an element than otherwise.
Example –

<Person name=”Peter”>
Attribute name can be given to an element person.

30.Can we have empty XML tags?

Yes, we can have empty tags in XML. Empty tags are used to indicate elements that have no textual content. Empty tags can be represented as

<person></person>
<person/>

31.What are the advantages of XML DOM Document?

Advantages of XML DOM:

  • XML structure is traversable, and it can be randomly accessed by traversing the tree.
  • XML structure is modifiable, and values can be added, changed and removed

32.What are the basic rules while writing XML?

These are the basic rules while writing XML:

  • All XML should have a root element
  • All tags should be closed
  • XML tags are case sensitive
  • All tags should be nested properly
  • Tag names cannot contain spaces
  • Attribute value should appear within quotes
  • White space is preserved

33.What is XML Element?

An XML document contains XML Elements, and it starts from an element’s start tag to end tag. It can contain:

  • Other elements within main element
  • An Attribute
  • text

34.What is CDATA?

CDATA is unparsed character data that cannot be parsed by the XML parser. Character < and > are illegal in XML elements. CDATA section starts with <![CDATA[“ and end with “]]>”.

35.How comment can be represented in XML?

Comment can be represented as <!- – comments – -> as like HTML. This comment symbol is applicable for single or multiple lines.

36.What are XML Namespaces?

XML namespaces are used to avoid element name conflicts, and it can be avoided by using prefix before the name.

37.What is XML Parser?

XML Parser is used to convert from XML document into an XML DOM object which can be written in Javascript.

38.What is XSL?

XSL is a language used with XML for expressing style sheets as like CSS. It describes how to display an XML document for a given type.

39.Who is responsible for XML?

XML is a recommendation of the W3C – World Wide Web Consortium and the development are supervised by XML working group.

40.What is an XML Schema?

An XML schema gives the definition of an XML document, and it has following:

  • Elements and attributes
  • Elements that are child elements
  • Order of child elements
  • Data types of elements and attributes

« Previous | 0 | 1 | 2 | 3 | 4 | Next »


copyright © 2014 - all rights riserved by javatechnologycenter.com