Saturday, April 20, 2013

XML Tutorial

What is Full Form of XML?
Full Form of XML is  eXtensible Markup Language.


What is Xml?
Xml is a language, used to transport OR store the data. It has not own tag, So you can create tag according to your requirement.


Where XML is used?
It is used in web-services/ Internet technology to transport OR store the data. It is mainly used in web services for transport the data across different server as XML is independent of language and Operating System (OS).


What are the New language created with use of xml?
Following are the languages created with XML

  • XHTML
  • WSDL for describing available web services(WS)
  • WAP/WML as markup languages for handheld devices
  • RSS / ATOM languages for news feeds
  • RDF and OWL for describing resources and ontology


Give an Example of XML

  Arun
  Mohali
  Punjab
  india



What are xml rules?
Following are some rules of xml
  • All elements must have closing tags.
  • All elements are case senstive
  • Must be properly nested
  • It must have root element
  • Attributes values must be quoted
  • Element name can contain letter, number and other character
  • Element name must start with letter
  • Element name cann't contain spaces.

What  are the benefits of xml?
Following are the benefits of xml
  • Simplicity
  • Extensibility 
  • Self Descriptions
  • Independent of OS
  • Transport / Store the data

What is DTD?
Document Type Definition is used to define the building blocks of elements, means its give information about elements and their use.


What is Schema?
It describe about the elements, alternate to DTD.


What are differences between DTDs and Schema?
  • Schema supports variety of data types similar to programming language where as DTD does not supports. In DTD all tags are similar to text.
  • Inheritance and relationship is possible in Schema, but not possible in DTD
  • Grouping one or more elemnets in possile in Schema only.

What is XML parser?
It is software/application that able to check the wellness of XML, validate of XML and read/write/delete the XML elements.


What is DOM?
Document Object Model is an platform and language independent object which is used to process the xml. DOM represent the entire XML in form of tree, where each and every elements and their values are present and make easy to access them.

There is 3 types of DOM
Core DOM: Standard model for any structured document.

HTML DOM: Standard model for HTML document. (use getElmentById or getElemnetByTagName functions to get the data from document)

XML DOM: Standard model for XML document (use xmlHttpRequest is used to deal with data)



What is SAX?
Simple API for Xml parsing.


What is XPath?
XPath  is an expression language which is used for addressing parts of an XML document. Used to navigate through elements and attributes in an XML document.


What is XMLHttpRequest?
It is used to get the data from the server after load the webpage. It is also able to see the request detail means in processing, finished or error.


Why use Namespaces?
Namespaces used to avoid the confliction when having two elements with same name. Actual it group the elements with some name known as namespace name. 

No comments:

Post a Comment