Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why do browsers display code when viewing XML?

BROWSERS code display viewing XML
0
Posted

Why do browsers display code when viewing XML?

0

Why do browsers display code when viewing XML?Answer: Web browsers only know how to display one type of XML: XHTML. All other XML that is opened in a Web browser will display as plain markup code unless you tell the browser how to display that markup. In other words, you could markup a complete XML document and never tell it how to display in a browser or in a printout. In fact, most XML has no styles attached to it, because they aren’t meant to be viewed in Web browsers. Instead they are used as data sources for Web applications like with Ajax. The simplest way to display XML in a nice fashion is to include SHTML tags in the markup. This tells Web browsers how to display the content. You can also use CSS style sheets to style XML and have it display in browsers that way.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123