How to display XML data as HTML?

How to display XML data as HTML?

 I have given you a example which show how to convert an XML document into HTML.Example:Here,I have given you simple XML example:bookshop.xml
   
- 
- 
  JAVA 
  The Complete Reference 
  Herbert Schildt 
  2005 
  30.91 
  
- 
  C++ 
  Programming in ANSI C++ 
  E Balaguruswamy 
  2007 
  38.99 
  
- 
  C 
  Exploring C 
  Yashwant kanetkar 
  2006 
  42.95 
  
  

When you want that example in HTML you should write that.






 For converting XML into HTML we use this.1.First you have to check the browser and load the XML using the correct parser2.now,we have created a HTML table with 3.we use getElementsByTagName() to get all XML book nodes4.we display data from ARTIST and TITLE as table data for each book.5.Use 
to end the table.

By:Vivek
Date:2015-01-09 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related XML Subjective Links

XML Subjective interview questions and answers for experienced and fresher