ExpertRating - Online Certification and Employment Testing ExpertRating - Online Certification and Employment Testing ExpertRating - Online Certification and Employment Testing

ExpertRating Home
ExpertRating Benefits
Recommend ExpertRating
Suggest More Tests
Privacy Policy
FAQ
Login
 
XML Tutorial - Index
XML Tutorial - Introduction to XML
XML Tutorial - How XML interact with data?
XML Tutorial - How to write first XML document
XML Tutorial - What are XML Elements and Attributes?
XML Tutorial - What is XML Schema and DTD?
XML Tutorial - Which Browser support XML?
XML Tutorial - XML and Styles
XML Tutorial - Embedding XML in HTML
XML Tutorial - Working with XML Parser
XML Tutorial - Working with CDATA
     

 
Online Personal Trainer Certification
Personal Trainer Certification (Spanish)
Six Sigma Certification
Find a Personal Trainer
Project Management Certification
Six Sigma Certification
Six Sigma Black Belt Certification
Master Black Belt Certification
Six Sigma Green Belt Certification
Life Coach Certification
Lean Management Certification
Lean Six Sigma Certification
First Aid Certification
CPR Certification
Yoga Certification
Aerobics Certification
Pilates Certification
Business Analyst Certification
SEO Certification
Online Business Writing Course & Certification
Makeup Artist Certification
Baby Sitting Course & Certification
Time Management Certification
Health Club Management Certification
Medical Coding Certification
Medical Billing Certification
Business Analysis Course
Master Trainer Certification
Total Quality Management Certification
Kaizen Certification
Creative Writing Certification
Event Management Certification
Test Search by Job Title
Administrative Assistant Certification
Virtual Assistant Certification
  All Online Courses
   

   
   
   
   
   
   

   
  Home > Courses, Tutorials & eBooks > XML Tutorial > Embedding XML in HTML
 

XML Tutorial - Embedding XML in HTML

 
Page 1 of 2
 
Overview
 
In this chapter you will learn :
  • How to embed XML into HTML?
  • What are the various ways to get XML data source?
  • What is Data Binding?

XML can be used to store data inside HTML documents. XML data can be stored inside HTML pages as "Data Islands". As HTML provides a way to format and display the data, XML stores data inside the HTML documents. The data contained in an XML file is of little value unless it can be displayed, and HTML files are used for that purpose.

The simple way to insert XML code into an HTML file is to use the <xml> tag. The XML tag informs, the browser that the contents are to be parsed and interpreted using the XML parser. Like most other HTML tags, the <xml> tag has attributes. The most important attribute is the ID, which provides for the unique naming of the code. The contents of the XML tag come from one of two sources : inline XML code or an imported XML file.

  • If the code appears in the current location , it's said to be inline.

Example
Embedding XML code inside an HTML File.
<html>
<xml Id = msg>
<message>
               <to> Visitors </to>
               <from> Author </from>
               <Subject> XML Code Islands </Subject>
               <body> In this example, XML code is embedded inside HTML code </body>
</message>
</xml>
</html>
  • The efficient way is to create a file and import it. You can easily do so by using the SRC attribute of the XML tag.

  • Syntax
                                       <xml Id = msg SRC = "example1.xml">
                                                      </xml>

Data Binding

Data binding involves mapping, synchronizing, and moving data from a data source, usually on a remote server, to an end user's local system where the user can manipulate the data. Using data binding means that after a remote server transmits data, the user can perform some minor data manipulations on their own local system. The remote server does not have to perform all the data manipulations nor repeatedly transmit variations of the same data.

  • Data binding involves moving data from a data source to a local system, and then manipulating the data, such as, searching, sorting, and filtering, it on the local system.

  • When you bind data in this way, you do not have to request that the remote server manipulate the data and then retransmit the results; you can perform some data manipulation locally.

  • In data binding, the data source provides the data, and the appropriate applications retrieve and synchronize the data and present it on the terminal screen.

  • If the data changes, the applications are written so they can alter their presentation to reflect those changes.

  • Data binding is used to reduce traffic on the network and to reduce the work of the Web server, especially for minor data manipulations.

  • Binding data also separates the task of maintaining data from the tasks of developing and maintaining binding and presentation programs.

 

 
Summary
 

In this chapter you have learnt

  • Embedding of XML into HTML.
  • Various sources of content for XML tag.
  • About data binding.
 
Review Questions
 

Fill in the Blanks

  1. When XML data is stored inside HTML pages, it is called as _________.
  2. The XML code can be inserted into an HTML file with the use of ______ tag.
  3. ______ attribute of XML tag provides for the unique naming of the code.
  4. The XML data can be placed as _______ or as an _______ file.
  5. ______ allows browser to retrieve data from the database.

Solutions

  1. Data Islands
  2. <XML>
  3. ID
  4. inline, imported XML
  5. Data binding

 

 
What's Next

The next chapter will acquaint you with the basic concepts of working with XML parser. The chapter will further elucidate about various types of parsers available and loading of XML file in browser and the concepts of unicode.

                  Hop over to the next chapter to get a close-up of XML Parsers.
 
   
 
 
     
Home  |  About Us  |  Privacy Policy  |  Site Map  |  FAQs  |  Contact Us
 
© ExpertRating 2015. All Rights Reserved.