如何用浏览器显示html标签的输出? [英] how to show the output for html tags with out browser ?

查看:103
本文介绍了如何用浏览器显示html标签的输出?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 <   html  >  
< head >
< / head >
< p style = color:red > 您好Welocme < / p >
< / html >

解决方案

如果你想要从html文件中简单地显示文本(控制台之类),您可以将其作为xml文件读取并提取所需的数据。你必须构建将要执行它的程序, xmlreader 类可能会有所帮助。

如果你还需要渲染格式,你需要构建你自己的html渲染引擎或找到一个可以执行此操作的类。



如果没有进一步的细节,就不可能给你一些比一般建议更好的东西。

<html>
<head>
</head>
<p style="color:red">Hi Welocme</p>
</html>

解决方案

If you want to simply display text (console like) from the html file, you can read it as an xml file and extract the data you want. You have to build the program that will do it, a xmlreader class may help.
If you want also to render formatting, you need to built your own html rendering engine or find a class that will do it.

Without further details, it is not possible to give you something better than general advices.


这篇关于如何用浏览器显示html标签的输出?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆