What's the equivalent of MSXML in .net?

I

isee

I want to send xml to some site and get response (also
XML). I am using vb.net,but I don't want to install MSXML
4.0 .
 
C

Cowboy \(Gregory A. Beamer\)

There is a whole namespace for XML in .NET (more than one actually,
depending on what you are doing):

System.Xml is where most of the classes you are familiar with reside. NOTE,
however, that the methodology has changed, especially for transformations,
so learn the new methodology or perish.

Other namespaces:

System.Xml.Schema
System.Xml.Serialization
System.Xml.XPath
System.Xml.Xsl

You can pretty much guess the use of each except perhaps serialization,
which is used to serialize objects into XML for distributed applications.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

**********************************************************************
Think Outside the Box!
**********************************************************************
 
C

Cowboy \(Gregory A. Beamer\)

There is no direct equivalent for HTTP posting in the .NET Framework,
largely due to the move to SOAP (ala Web Services). As such, I would try to
move away from this methodology. If this is not possible, continue to use
the MSXML package. There are some managed classes in there, although I am
not sure about the HTTP classes, and you can use interop for the remainder.

To roll a completely .NET solution, you will end up creating sockets, et al.
I know I have seen an example of this on the web. I will put a marker on
this thread and see if I can come back with an answer later.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

**********************************************************************
Think Outside the Box!
**********************************************************************
 
D

Dino Chiesa [Microsoft]

private static string PostURI(string URI, string Parameters)
{
string CommandURI = URI;
WebRequest myWebRequest = WebRequest.Create(CommandURI);

//needed only if outbound traffic must go through a proxy server
//WebProxy proxyObject = new WebProxy("http://MyProxyServer:80/",true);
//myWebRequest.Proxy = proxyObject;

myWebRequest.ContentType = "application/x-www-form-urlencoded";
myWebRequest.Method = "POST";
byte [] bytes = System.Text.Encoding.ASCII.GetBytes(Parameters);
myWebRequest.ContentLength = bytes.Length;
Stream OutputStream = myWebRequest.GetRequestStream ();
OutputStream.Write (bytes, 0, bytes.Length);
OutputStream.Close ();
WebResponse MyWebResponse = myWebRequest.GetResponse();
Stream MyStream = MyWebResponse.GetResponseStream();
StreamReader MyStreamReader = new StreamReader(MyStream);
return MyStreamReader.ReadToEnd().Trim();
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

MSXML Post 2
MSXML 3
MSXML 6 Service Pack 2 0
MSXML 6 Service Pack 2 2
MSXML 4.0 SP2 1
Do I need MSXML? 1
What should I keep? 5
Ping= Lucy [MSFT] = 1

Top