开发者

How to display images using XML?

开发者 https://www.devze.com 2023-02-18 05:42 出处:网络
Hey guys. Does anyone know what do I have to enter in the DTD f开发者_开发问答ile in order to display an image from XML file? The question is a little strange. Are you defining a new DTD? For what pur

Hey guys. Does anyone know what do I have to enter in the DTD f开发者_开发问答ile in order to display an image from XML file?


The question is a little strange. Are you defining a new DTD? For what purpose? If you want to display images from XML, you may want to use XHTML. Its DTD has the img element just for that purpose, and any Web browser knows how to render it.

In any case the XHTML DTD may serve as inspiration if you're defining your own DTD, but keep in mind that XML itself will not display any image: you need to process it (and that's what a Web browser does for XHTML).


you need a xslt file to display pictures in the browser.

dtd describes the document structure xslt can transform the xml document e.g. to html -> browser can show pictures.

0

精彩评论

暂无评论...
验证码 换一张
取 消