Using XML in HTML page

In most the websites the actual content is got from an xml file or from a database instead of hard coding the content. This helps the organization to employ different people for different purposes.


_______________________________________________

The content developers can concentrate on providing the content and the designers would concentrate on the design of the web page alone. This improves the overall productivity.

So it is better to separate the content from the design. For small websites you can have the content in an xml file instead of a database.

Once you have the content in the xml file, it is easy to embed it in the html file to display the web page with the content. They are many ways to do this. One of the easiest ways is to embed the xml file in the html with an <xml> tag and use the 'src' attribute to identify the source of the xml file and give an 'id' for this tag.

Then you can use this source id in the <span> in which you need to display the content. Use the attribute 'datafld' to identify the nodes in the xml that needs to be displayed.




_______________________________________________

FREE Subscription

Subscribe to our mailing list and receive new articles
through email. Keep yourself updated with latest
developments in the industry.

Name:
Email:

Note : We never rent, trade, or sell my email lists to
anyone. We assure that your privacy is respected
and protected.

_______________________________________







 

 

FREE Subscription

Stay Current With the Latest Technology Developments Realted to XML. Signup for Our Newsletter and Receive New Articles Through Email.

Name:

Email:

Note : We never rent, trade, or sell our email lists to anyone. We assure that your privacy is respected and protected.

 

 

Add to My Yahoo!

Visit XML Training Material Guide Homepage

 

 

Copyright - © 2004 - 2017 - All Rights Reserved.