Blog de Francisco Velázquez

otro blog personal

Posts Tagged ‘xml

POST multipart message MIME

leave a comment »

Send a content type “multipart/form-data” request from C#.

.Net (C#) and SOAP with Attachments.

SharpMimeTools Documented Class Library.

A C# Implementation of Mime De/encode.

How to use HttpWebRequest and HttpWebResponse in .NET.

Advertisements

Written by fravelgue

March 2, 2009 at 10:29 am

Posted in development

Tagged with , , , , ,

Serialize/Deserialize

leave a comment »

using System.IO;
 using System.Xml;
 using System.Xml.Serialization;

private string serialize(System.Type type, Object data)
 {
 XmlSerializer xmlSerializer = new XmlSerializer(type);
 System.IO.TextWriter writer = new System.IO.StringWriter();
 xmlSerializer.Serialize(writer, data);
 writer.Close();
 return writer.ToString();
 }

private object deserialize(System.Type type, string data)
 {
 XmlSerializer xmlSerializer = new XmlSerializer(type);
 TextReader textReader = new StringReader(data);
 XmlReader xmlReader = new XmlTextReader(textReader);
 return xmlSerializer.Deserialize(xmlReader);
 }

Written by fravelgue

September 19, 2006 at 9:52 am

Posted in development

Tagged with , , , ,