我想制作一个html文件的DOM/修改文本节点并从DOM中重新生成html文件 [英] I want to make DOM of a html file / modifying the text nodes and regenerating the html file out of DOM

查看:100
本文介绍了我想制作一个html文件的DOM/修改文本节点并从DOM中重新生成html文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI

我想获取html文件的html内容并修改某些区域(实际上我想翻译html页面中的文本),然后从修改后的DOM树中重新构建新的html文件.有人可以向我展示如何我能做到吗?我已经找到了html DOM解析器,但是它们没有为我重新生成修改后的html文件.它们只是给我DOM,我可以将文本节点修改为所需的内容,但是我无法拥有新的html文件.

我不想使用.net框架.仅VC ++被批准.
有人可以帮我解决这个问题吗?我真的很困惑!:(

我发现了

http://www.ibusy.com/boost-htxml-library.html


有人可以帮我这个忙吗?似乎相关,但我对BOOST一无所知,我应该如何在boost 2008上安装boost?我已经下载了文件,但不知道该怎么办?:confused :

HI

I want to get the html content of an html file and modify some areas (actually I want to translate the text in the html page )and then REBUILD the new html file out of my modified DOM tree.Can anybody please show me the way how I can do that ?I have found html DOM parsers,but they dont regenerate the modified html file for me .they just give me the DOM and I can modify the text nodes to things which I want but I can not have the new html file.

I don''t want to use .net framework. Just VC++ is approved.
CAn anyone help me with this content ?I ''m really confused!:(

I found

http://www.ibusy.com/boost-htxml-library.html


Can anyone help me with this?seems to be relevant ,But I don''t know anything about BOOST ,How should I install boost on my 2008 ?I have downloaded the files but I don''t know what to do ?:confused:

推荐答案

大家好,


我终于找到了解决方案! :laugh:
我使用了Boost htxml库(非常感谢作者:rose :)
该库几乎支持我为y项目所需的所有内容.


祝你一切顺利;)
Mehrnaz.
Hi again everybody ,


I finally found the solution! :laugh:
I used Boost htxml library (many many thanks to the author :rose:)
the library supports almost everything I needed for y project.


wish u all best ;)
Mehrnaz.


您是否尝试过 HTML Agility Pack [
Have you tried the HTML Agility Pack[^]? I think that supports modifying and re-writing the DOM.


感谢Simon的答复,但我不想使用.net框架.仅VC ++被批准. br/> 另外请注意,我想同时将.html文件作为项目的输入和输出.
Thank you Simon for ur reply but I don''t want to use .net framework .just VC ++ is approved .
in addition notice that I want to have .html file both as input and output of my project .


这篇关于我想制作一个html文件的DOM/修改文本节点并从DOM中重新生成html文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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