xml Stream to remote client
-
Hello, I want to send log-data to a client over TCP/IP and UDP. As data format I think the best way is to use XML. Now I search a possibilty to make a well formed Xml file from the data. I have found some solutions with External entities. But here I have the problem that I have an live stream and I don't want to make allways a new file of the stream. What is the best solution to do this? It would be great If in the future I have the possibilty to open the log-server also with an internet explorer...may be someone can give me some hints... Best regards Hansjörg
-
Hello, I want to send log-data to a client over TCP/IP and UDP. As data format I think the best way is to use XML. Now I search a possibilty to make a well formed Xml file from the data. I have found some solutions with External entities. But here I have the problem that I have an live stream and I don't want to make allways a new file of the stream. What is the best solution to do this? It would be great If in the future I have the possibilty to open the log-server also with an internet explorer...may be someone can give me some hints... Best regards Hansjörg
This will work. Put it as the only code in a page behind file. protected void Page_Load(object sender, EventArgs e) { Response.Clear(); Response.ContentType = "text/xml"; XmlSerializer xml = new XmlSerializer(typeof(SomeObject)); xml.Serialize(Response.Output, someObject)); Response.Flush(); Response.Close(); }
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway