Results 1 to 2 of 2

Thread: How to use XML - Extensible Markup Language

  1. #1
    Join Date
    Nov 2005
    Posts
    709

    Exclamation How to use XML - Extensible Markup Language

    What is XML ?

    Extensible Markup Language (XML) is the markup language data (meta-markup language) that provides a format for describing structured data. This facilitates more precise declarations of content and more significant results of search through multiple platforms. XML will also allow the emergence of a new generation of applications, manipulation and visualization of data via Internet.
    XML allows the definition of an infinite number of tags. As in HTML, where the tags can be used to define the formatting characters and paragraphs, XML provides a system to create tags for structured data.

    An XML element can be declared as data sales prices, price rates, a title of book, the amount of rain, or any other item of data. As XML tags are adopted by intranets of organizations, and also via the Internet, there will be a corresponding ability to search for and manipulate data regardless of where the applications are found. Once the data has been found, it can be distributed by the network and displayed in a browser like Internet Explorer 5 in several ways, or that data can be transferred to other applications for processing and future viewing.

    Introduction to XML - Extensible Markup Language


    WebSite now almost all are of pages in HTML (HyperText Markup Language). The term hypertext is defined as texts that have links to other texts. Already the term markup language annotations to define the structure of a text. The design of HTML documents have two important characteristics:

    1. Html documents are made to provide logical structure of information for the presentation of pages of the global network of computers.

    2. The language contains a set of HTML tags with a fixed number to define the document structure, and each tag has already defined its semantics. The CSS (Cascading Style Sheets) allows the separation of the logical structure of the appearance of the page. But, although the layout can be separately defined in CSS, the HTML is designed specifically for hypertext, and not to information in general!

    XML - Extensible Markup Language is not a substitute for HTML - Hypertext Markup Language. Both are designed to provide the below goals.

    1. The main function of XML is to transport and store data including the format.
    2. The main function of HTML is to display data, including the display of data.



    Comparison between XML and HTML


    HTML and XML are cousins. They derive from the same inspiration, the SGML. They identify elements in a page, and both use similar syntax. If you are familiar with HTML, it will be more easy to work with the XML. The big difference between HTML and XML is that HTML describes the appearance and actions on a page in the network as XML does not describe or appearance and actions, but what each piece of data is or is. In other words, XML describes the content of the document.

    As HTML, XML also makes use of tags (words encapsulated by signs < & > ) and attributes (set with name = value ), but while HTML specifies each direction for the tags and attributes (and often the way in which the text between them will be displayed in a browser). The XML tags are only use to delimit pieces of data, and leaves the interpretation of data to be held fully to the application that is reading. In short, while in an HTML document <p> a tag indicates a paragraph in the XML tag that can indicate a price, a parameter, a person, or anything else you can imagine (including something that has nothing to do with a p such as authors of books).

    The XML files are text files, but are not intended for reading by a human being as is HTML. The XML documents are text files that they facilitate the developers or developers' debugging "applications more easily, so a simple text editor, can be used to correct an error in an XML file. But the rules for formatting XML documents are much stricter than for HTML documents. A forgotten tag or an attribute without quotes makes the document unusable, while in HTML it is tolerated. The official XML specifications require that applications can not try to guess what is wrong in a file (in HTML that happens), but must interpret it to stop and report the error.
    Features

    1). Structured representation of data :

    XML provides a structured representation of data that was shown to be extensively implementable and easy to be developed. Industrial implementations in language SGML (Standard Generalized Markup Language) showed the intrinsic quality and strength of industrial tree structured format of XML documents. XML is a subset of SGML that is optimized for distribution via the web, and is defined by the Word Wide Web Consortium (W3C), ensuring that structured data will be uniform and independent of applications and vendors. XML provides a standard that can encode the content for a variety of applications from simple to the most complex, including:
    • A simple document.
    • A record structured as a purchase order for products.
    • An object with methods and data objects such as Java or ActiveX controls.
    • A record of data. An example would be the result of a query to databases.
    • Layout and user interface applications.
    • Entities and types of layout patterns.
    • All links between information and people on the web.


    An important feature is that once the data has been received by the customer, this data can be manipulated, edited and viewed without the need to react the server. Thus, the servers have less overhead, reducing the need for computing and reducing also the request for bandwidth for communications between client and server. XML is considered of great importance in the Internet and intranets in large because of interoperability provides the ability of computers to have a flexible and open standard, independent of device. The applications can be built and updated more quickly and also allow multiple ways of viewing the structured data.

    2). Separation between data and presentation :

    The most important feature of XML comes to separate the user interface (presentation) of structured data. The HTML specifies how the document should be displayed on the screen by a browser. But the XML defines the content of the document. For example, HTML tags are used to define size and color of font, and paragraph formatting. In XML you use the tags to describe data, such as tags, topic, title, author, content, references, dates, etc. XML also has resources such as style sheets defined in Extensible Style Language (XSL) and Cascading Style Sheets (CSS) for presentation of data in a browser. XML separates data from presentation and process, which allows you to view and process the data as you wish, using different style sheets and applications.

    Structure of document

    An XML document is a labeled tree where a node is outside of :-
    Data of characters (a string of text)
    Processing instructions (annotations for the processor), typically in the header of the document
    A comment (not together with semantics)
    A declaration of entity (simple macros)
    We DTD (Document Type Declaration)

    An internal node is an element, which is labeled with:
    A name or
    A set of attributes, each consisting of a name and value.
    Typically, comments, statements of entities and DTD information is not explicitly represented in the tree.

    Example :
    HTML Code:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <note>
      <to>Mac</to>
      <from>James</from>
      <heading>Alert</heading>
      <body>Call me on sunday</body>
    </note>
    The first line in the above example is called declaration. It denotes the version of XML and the used encoding. The next line "note" indicates the root element of the document. Like the above codes denotes that the documents is reminder note. The next 4 lines are called child elements. And of course the last line denotes the end.

    HTML Code:
    <root>
      <child>
        <subchild>.....</subchild>
      </child>
    </root>
    The above is an sample of tree view of XML language.

  2. #2
    Join Date
    May 2008
    Posts
    432

    Re: How to use XML - Extensible Markup Language

    Inserting XML documents into HTML

    An XML document by itself does not indicate how the information should be viewed.

    The data contains just the facts (the kind who ordered a book and for what price). But the HTML is a great language for presenting data to the end user. A good example would be an employee of a virtual library for accessing the data records to find lists of input requests. Such data could still be represented in XML and display them in HTML. This kind of bookstore that need your server logs to convert XML to HTML. This could also be done by the user's browser.

    The mechanisms of binding of data and style sheets can be used to organize the XML data in a visual presentation, and to add interactivity. The binding data (data binding) is a Dynamic HTML (DHTML), which move individual items of data from an information source (eg XML) to an HTML presentation, allowing the HTML is used as a model display of XML data. This is like a link in the message processing of words.

    The XSL (Extensible Stylesheet Language) can add even more power to this process. An XSL stylesheet contains instructions for removing information from an XML document and transform it to another format such as HTML. This transformation is done on a declarative, not via scripts. Furthermore, the USA XSL XML as its syntax, which prevents authors of XML documents have to learn another type of markup language data.

    The Cascade Style Sheets (CSSs) can also be used for XML data, but more simplified in structure and are usual in such situations. However, the CSSs is not from a pattern of presentation that differs from the structure of the data source. With XSL, it is possible to generate structures of submission (in HTML, for example) that are very different from the original data structures of XML documents, as shown below. XSL is the tool to perform this transformation. The XSL provides semantic and structural independence of content and presentation.

Similar Threads

  1. How to create Margin/markup formula for Excel
    By Lanka Boy in forum Windows Software
    Replies: 3
    Last Post: 06-01-2012, 07:17 PM
  2. Replies: 3
    Last Post: 09-05-2011, 02:23 PM
  3. Replies: 4
    Last Post: 30-03-2011, 07:23 AM
  4. Extensible Business Reporting Language
    By SoftWore in forum Technology & Internet
    Replies: 2
    Last Post: 02-08-2010, 12:52 PM
  5. HTML 5 - the latest revision of Hypertext Markup Language
    By TechyGuy in forum Guides & Tutorials
    Replies: 3
    Last Post: 27-01-2010, 09:39 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,871,801.60972 seconds with 17 queries