从一个xml/pdf/文本文件创建多个pdf或html [英] creating multiple pdf or html from one xml/pdf/text file

查看:113
本文介绍了从一个xml/pdf/文本文件创建多个pdf或html的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在这里很陌生,这是我的第一个问题.有没有办法从巨大的XML/PDF/TEXT文件创建多个html文件或pdf文件?

这是示例xml链接
http://www.gpo.gov/fdsys/pkg/CFR-2011-title16-vol2/xml/CFR-2011-title16-vol2.xml

或这是示例html链接
http://www.gpo.gov/fdsys/pkg/CFR-2011-title16-vol1/html/CFR-2011-title16-vol1.htm

基本上,我想每秒钟生成一个单独的html文件.就像下面的

秒0.1第0.1节主题
文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本

秒0.2第0.2节主题
文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本

我当时正在考虑使用正则表达式.有可能吗?
谢谢

I am kind of new here and this is my first question. Is there a way to create multiple html files or pdf files from huge XML/PDF/TEXT file?

This is the example xml link
http://www.gpo.gov/fdsys/pkg/CFR-2011-title16-vol2/xml/CFR-2011-title16-vol2.xml

or here is the example html link
http://www.gpo.gov/fdsys/pkg/CFR-2011-title16-vol1/html/CFR-2011-title16-vol1.htm

Basically I would like to generate separate html file for each sec. like below

Sec. 0.1 Section 0.1 Topic
text text text text text text text text text text text text text text text text text text text text text text text

Sec. 0.2 Section 0.2 Topic
text text text text text text text text text text text text text text text text text text text text text text text

I was thinking to use regex. Is that possible?
Thanks

推荐答案



对于HTML创建,如果xml大,最好不要使用正则表达式. (我正在下载xml文件,该过程几乎花费了8-9分钟).您可能需要为此编写一些自定义代码.

对于pdf创建,可以通过bt Aspose提供的.NET兼容组件来进行操作.

在这里检查

http://www.aspose.com/categories/.net -components/aspose.pdf-for-.net/default.aspx [
Hi,

For HTML creation, if the xml is large, it is good that you pleae dont use the regex. (I was downloading of the xml file which almost took 8-9 minutes). You might need to write some custom code for this.

For pdf creation, maniulation can be done by .NET compatible component provided bt Aspose.

Check here

http://www.aspose.com/categories/.net-components/aspose.pdf-for-.net/default.aspx[^]

Hope that helps,


这篇关于从一个xml/pdf/文本文件创建多个pdf或html的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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