阅读背景:

如何将字符串[]中的单个值传递给XDocument.Load Stream?

来源:互联网 

I have this code:

我有这个代码:

namespace ReadXMLfromFile
{
class Program
{
    static void Main(string[] args)
    {
            string path = args[0];

            Console.WriteLine("Looking in Directory: " + path);
            Console.WriteLine("Files in Directory:");

            string[] files = Directory.GetFiles(path, "*.xml");
            foreach (string file in files)
            {
               Console.WriteLine(Path.GetFileName(file));
            }

            XDocument doc = XDocument.Load(???????);

            var spec = doc.XPathSelectElement("project/triggers/hudson.triggers.TimerTrigger/spec").Value;

            //Write to the console

            Console.Write(spec);
            ....
namespace ReadXML



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: