简体   繁体   English

将XML解析为CSV

[英]Parse XML as CSV

I am looking for a method to grab XML files and parse them as CSV. 我正在寻找一种获取XML文件并将其解析为CSV的方法。 The XML files will have the same optional data elements but I will basically be grabbing those XML files every X minutes parse only certain elements out and output to a CSV for further processing such as importing into SQL, etc. I have used XSLT and XMLDOM for parsing XML, however, that was for HTML output. XML文件将具有相同的可选数据元素,但基本上,我将每隔X分钟抓取这些XML文件,仅将某些元素解析出来并输出到CSV以进行进一步处理(例如导入到SQL等)。我使用了XSLT和XMLDOM但是,解析XML是为了HTML输出。 I am open to using ASP, VBScript, batch scripting, JavaScripting, etc. Most scripting language (IIS) or can possibly use C# of necessary although am new to C# and not really yet handling complex apps as of yet. 我愿意使用ASP,VBScript,批处理脚本,JavaScripting等。大多数脚本语言(IIS)或可能使用必要的C#,尽管C#是新来的,但到目前为止还没有真正处理复杂的应用程序。

Any thoughts on languages and methods to accomplish something like this? 对实现此类目标的语言和方法有任何想法吗?

XSLT isn't restricted to producing HTML; XSLT不仅限于生成HTML;它还可以生成HTML。 you can produce any output with it. 您可以用它产生任何输出。

Since you have already workded with it, it sounds like your best option. 由于您已经在使用它,这听起来是您的最佳选择。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM