Hi, does anyone knows how to read wcf file using xdocument or xelement ? I would like to retrieve out the data from my database using web client instead service reference method. Does anyone have articles on that or the codings ?
If the WCF exposes itself on HTTP, you can query it with a System.Xml.Linq.XDocument.
Since I don't have an online WCF page to use for testing, I have a WS demo that might use the same technique.
This example queries the page for all of the Zip Codes and Cities in the state of Tennessee.
I used the System.Xml.Linq.XDocument because it's easier to use.
static void Main(string args)
string strURI = "http://www.webservicex.net/uszip.asmx/GetInfoByState?USState=TN";
XDocument xd = XDocument.Load(strURI);
foreach (XElement xe in xd.Elements().Elements())//two levels down
catch (Exception exc)
Console.WriteLine("Could not load page: " + exc.Message);
Need some help with this Array. I am trying to get the sum of the even numbers and the sum of the odd numbers using a for each loop. I know the answers to what I am trying to achive are sum of even = 84 and the sum of ...
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...