Good evening Jano

Path.GetTempFileName doesn't offer me much (except avoiding unauthorized
access to folders, I guess) because the TMP or XML files should be cleaned
up rather than just being out of sight. (ie, lines of code is only 2-3
less). 

No, the local machines would seldom/never be configured to serve up ASP.NET 

And I don't want to insert a webbrowser control into a Windows Form. 

  _____  

Ian Thomas
Victoria Park, Western Australia

  _____  

From: [email protected] [mailto:[email protected]]
On Behalf Of Jano Petras
Sent: Tuesday, January 10, 2012 6:47 PM
To: ozDotNet
Subject: Re: How to feed xmldocument as in-memory string into browser (IE9)?

 

Hi Ian,

Unless the external app (in this case, browser) has some kind of command
line switch that would make it read stdin for example for its input
(analogue to pipe operator in command line - such as dir /s | find
"myspecialfile.txt"), you will need to create intermediate file. 

Alternative of course is to create ASP.NET application,  which would be
served from IIS where you could upload your json and would get XML directly
in the browser window. It seems to me that for what you trying to achieve,
writing a temp file is fine. 

Check out System.IO.Path.GetTempFileName method. 

Sorry if I wasn't of any help. 

Cheers,
jano

On 10 January 2012 11:40, Ian Thomas <[email protected]> wrote:

Again, something really simple I think - I will appreciate the help. 

I have a console application that converts json to xml, then displays the
xml in the default browser. It works fine if I write the xmldocument to disk
first - doc.save(filename) - then start a process with browser (or pathed
file alone). All on a local machine. For information, doc.save(Console.out)
gives the user some feedback but is redundant. 

But I would prefer not to write the intermediate file. 

I have been trying to pass a String derived from xmldocument to
MyProcess.StartInfo.Arguments(xxx)  - ie, trying to feed the content direct
to the browser (which is started with MyProcess.StartInfo.FileName =
theBrowser).

Internet Explorer takes a filename as input (my .Argument(xxx) is fine), but
how can I pass the xmldocument straight to it? 

  _____  

Ian Thomas
Victoria Park, Western Australia

 

 

Reply via email to