如何拆分大型xml文件? [英] How do I split a large xml file?

查看:31
本文介绍了如何拆分大型xml文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们将记录"导出到一个 xml 文件;我们的一位客户抱怨文件太大,他们的其他系统无法处理.因此,我需要拆分文件,同时在每个新文件中重复标题部分".

We export "records" to an xml file; one of our customers has complained that the file is too big for their other system to process. Therefore I need to split up the file, while repeating the "header section" in each of the new files.

所以我正在寻找可以让我为应该始终输出的部分定义一些 xpath 的东西,以及为行"定义另一个 xpath 的参数,该参数说明在每个文件中放置多少行和如何命名文件.

So I am looking for something that will let me define some xpaths for the section(s) that should always be outputted, and another xpath for the "rows" with a parameter that says how many rows to put in each file and how to name the files.

在我开始编写一些自定义 .net 代码来执行此操作之前;是否有可以在 Windows 上运行的标准命令行工具?

Before I start writing some custom .net code to do this; is there a standard command line tool that will work on windows that does it?

(因为我知道如何在 C# 中编程,我更多地参与编写代码然后尝试使用复杂的 xsl 等,但自我"解决方案会比自定义代码更好.)

(As I know how to program in C#, I am more included to write code then try to mess about with complex xsl etc, but a "of the self" solution would be better then custom code.)

推荐答案

是否有标准的命令行工具可以在 Windows 上运行?"

"is there a standard command line tool that will work on windows that does it?"

是的.http://xponentsoftware.com/xmlSplit.aspx

这篇关于如何拆分大型xml文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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