The ':' character, hexadecimal value 0x3A, cannot be included in a name

Posted by coure06 on Stack Overflow See other posts from Stack Overflow or by coure06
Published on 2010-04-04T19:06:21Z Indexed on 2010/04/04 19:13 UTC
Read the original article Hit count: 1183

Filed under:
|
|
|

I have an xml file that contains its element like

<ab:test>Str</ab:test>  

When i am trying to access it using the code

XElement tempElement = doc.Descendants(XName.Get("ab:test")).FirstOrDefault();

Its giving me error

System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Xml.XmlException: The ':' character, hexadecimal value 0x3A, cannot be included in a name.

How shld i access it?

© Stack Overflow or respective owner

Related posts about c#

Related posts about LINQ