通过格式化将网页 html 解析为文本字段的有效且准确的方法?

发布于 2024-10-08 06:23:49 字数 282 浏览 0 评论 0原文

我想将 web html 解析为 Flex 文本字段,我考虑了三种方法来

  1. 使用字符串函数拼接等,将标签替换为文本字段可以理解的标签,但它是否太复杂且处理开销太大是否存在降低效率的情况,但我有最大的控制权来进行我需要的更改。

  2. 将html解析为xml,然后将其作为文本字段的文本输入,从这个问题中需要了解效率和控制能力。

  3. 正则表达式。

哪一个最适合搭配网络文本。

需要帮助的

问候。

i want to parse the web html to flex text field i have three approaches in mind to do soo

  1. to use string function splice etc. to replace tags with the one which text fields can understand but is it too complex and processing over head is there that reduces the efficiency but i have max control to do changes what i needed.

  2. parsing the html to xml and then use this as the text input to text field what about the efficiency and control need to know about from this question.

  3. regular expressions .

which one will be the most suitable in paring the web text.

help required

regards.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

可爱暴击 2024-10-15 06:23:49

我建议彻底改变你的方法。如果你需要显示一个简单的HTML,那么你可以直接通过flash/flex来解析它。在其他情况下,当您有复杂的 HTML 页面时,您应该使用 IFrame。这是非常简单有效的方法,对您的情况非常有用。您可以在这里找到它的描述:
Flex 和 IframeFlex Iframe 项目网站

祝你好运!

I'd suggest to completely change your approach. If you need a simple HTML to be displayed, then you can directly parse it by the flash/flex. In other cases, when you have a complex HTML page(s), then you should use IFrame. That's really simple and efficient approach and could be very useful in your case. Here you can find its description:
Flex and Iframe,Flex Iframe Project site.

Good luck!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文