![]() |
|
![]() | ||
|
Subject:
sending text/XML in C#
Category: Computers > Internet Asked by: nk412-ga List Price: $50.00 |
Posted:
28 Dec 2003 14:09 PST
Expires: 27 Jan 2004 14:09 PST Question ID: 290921 |
How do I send XML request in C# ? | |
| |
| |
| |
|
![]() | ||
|
There is no answer at this time. |
![]() | ||
|
Subject:
Re: sending text/XML in C#
From: cdc-ga on 31 Dec 2003 07:52 PST |
Are you using web services? Are these pages in the same web or different? Can you utilize web services, or do you need to send the data during a redirect? |
Subject:
Re: sending text/XML in C#
From: nk412-ga on 31 Dec 2003 17:54 PST |
Not using web services, just transfer using XML Request/response |
Subject:
Re: sending text/XML in C#
From: cdc-ga on 03 Jan 2004 14:47 PST |
Well, to generate some XML, use the System.Xml namespace. E.G.: using System.Xml; [...] public string GetUserXml(string userName) { XmlDocument doc=new XmlDocument(); XmlElement userId=doc.CreateElement("UserId"); userId.InnerText=userName; doc.AppendChild(userId); return doc.OuterXml; } The call GetUserXml("User1") will generate and return the XML string "<UserId>User1</UserId>". Just modify the method as you see fit, and use a WebRequest to send the data out... |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |