What are the advantages of creating web pages with XML instead of HTML?

后端 未结 6 916
你的背包
你的背包 2021-02-08 00:46

From time to time, I see web pages whose content is solely written in XML (not HTML or XHTML). These pages usually have some style sheets (either XSLT or CSS) attached to them w

6条回答
  •  天涯浪人
    2021-02-08 01:12

    One possible advantage would be for use of the data of the page in something other than a web browser; that would (presumably) be easier to do if a page's content were well-formed XML. Of course in theory a well-formed, semantic XHTML page should be nearly as able to be parsed, as well.

    It can also be easier to generate XML instead of XHTML, depending on the data source.

提交回复
热议问题