Click here to Skip to main content
15,907,001 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
i m trying to consume a webservice in xml.linq in order to avoid the service timeoit on a slow network.
I called the linq as shown below but it will returning an error. The character : hexadecimal value 0x3A cannot be included in the name.
C#
Try{
XDocument xdoc ;
xdoc.load("theurl");
textboxname.text =xElement("Ax27:Accountname").value;
}
catch (Exeception as ex){
textbox.text=ex.message;
}

===========================================
here is the document
============================================
XML
xmlns:ns="http://rpaymentdata.com">
<ns:return xsi:type="ax27:customeraccts" xmlns:xsi="http://www.w3.org/2001/XMLschema-instance" xmlns:ax27="http:paymentdata.com/xsd">
<ax27: xsi:type="ax27:customeraccts" acctsumm="">
<ax27:acctno>100003457</ax27:acctno>
<ax27:accountname> Yusuf ahmed</ax27:accountname></ax27:></ns:return></ns:getaccoutsummary>
Posted
Updated 4-Oct-12 22:00pm
v3
Comments
Ashraff Ali Wahab 4-Oct-12 10:16am    
can you post the XML you are trying to read.
Gasbie 4-Oct-12 11:44am    
Here is the xml below
=======================
<ns:getaccoutsummary xmlns:ns="http://rpaymentdata.com">
<ns:return xmlns:ax27="http:paymentdata.com/xsd" xmlns:xsi="http://www.w3.org/2001/XMLschema-instance" xsi:type="ax27:customeraccts">
<ax27: acctsumm="" xsi:type="ax27:customeraccts">
<ax27:acctno>100003457
<ax27:accountname> Yusuf ahmed
Gasbie 4-Oct-12 11:48am    
This page read it perfectly can share how it was consumed.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900