如何使用c#调用exe文件并将xml文件作为参数传递给它 [英] how to invoke exe file and pass xml file as parameter to it using c#

查看:528
本文介绍了如何使用c#调用exe文件并将xml文件作为参数传递给它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我是初学者,我已经完成了创建c#应用程序的任务,该文件调用了saxonb9-1-0-8n的exe文件并将xml文件作为参数并将其转换为xslt file..Do有谁知道怎么做或者任何人已经实现了它?



plz help ..

hello all,
I am beginer and i have given task to create c# applictaion that calls an exe file of saxonb9-1-0-8n and takes xml file as parameter and convert it to xslt file..Do anyone have idea how to do it or anyone have already implemented it??

plz help..

推荐答案

所以制作一个控制台应用程序,查看命令行参数以及如何解析它们。



然后将xml精简到xsd



http://msdn.microsoft.com/en- us / library / x6c1kb0s.aspx [ ^ ]



然后去看看这个



http://social.msdn.microsoft .COM /论坛/ vstudio / EN-US / 2cc286ca-4903-45 a3-b0e6-e2ef397ca590 / generate-xslt-from-xsd-file-in-c [ ^ ]

< br $>


bryce



i应为此收费
so make a console app, check out the command line arguments and how to parse those.

Then lean about xml to xsd

http://msdn.microsoft.com/en-us/library/x6c1kb0s.aspx[^]

then go read this

http://social.msdn.microsoft.com/forums/vstudio/en-US/2cc286ca-4903-45a3-b0e6-e2ef397ca590/generate-xslt-from-xsd-file-in-c[^]


bryce

i should be charging for this


为此目的,你可以使用

For that purpose, you can use
System.Diagnostics.Process.Start("name of exefile","parameters");



我不知道该程序的命令行参数,但找到它们对你来说不应该太复杂。从命令行手动启动任务后,只需将命令传递给Process.Start方法,如上所述。


I do not know the command line arguments of that program, but finding them should not be too complicated for you. After you got your task running when you start it manually from the command line, just transfer the command to the Process.Start method as described above.


这篇关于如何使用c#调用exe文件并将xml文件作为参数传递给它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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