c# - XML not filtering out results from file in Windows Phone -


यह नमूना XML है जो मुझे मिला है:

  & lt; ArrayOfService & gt; & lt; सेवा z: आईडी = "i1" xmlns: z = "http://schemas.microsoft.com/2003/10/Serialization/" & gt; & LT; primaryUrl & gt; http: //www.buses.co.uk/1A< / primaryUrl & gt; & LT; relativePosition & gt; 2 & lt; / relativePosition & gt; & Lt; serviceDescription & gt; व्हाइटहाक - काउंटी अस्पताल - सिटी सेंटर - होव - पोर्ट्सलेड - माइल ओक & lt; / सेवा विवरण & gt; & LT; serviceId & gt; 1150 & lt; / serviceId & gt; & LT; SERVICENAME & gt; 1 ए & lt; / SERVICENAME & gt; & Lt; सेवा नोट / & gt; & lt; सेवा पाठ & gt; व्हाइटहाक - माइल ओक & lt; / सेवा टेक्स्ट & gt; & lt; serviceUrls / & gt; & Lt; / सेवा & gt; & Lt; / ArrayOfService & gt;   

यह कोड है:

  XDocument loadedData = XDocument.Load ("services.xml"); // XNamespace ns = "http://schemas.datacontract.org/2004/07/BusExpress.ClassLibrary"; ("सेवा") जहां (स्ट्रिंग) आइटम। एलेमेंट ("सेवानाम") == "1 ए" का चयन करें (स्ट्रिंग) आइटम। एलेमेंट ("serviceId" )) FirstOrDefault ()।;   

परिणाम शून्य के रूप में आ रहा है, यह क्यों है?

< <<> लोडेडडेटा। डिसेन्डेंट्स ("अर्रेऑफ़सेवायर") होना चाहिए loadedData.Root

विवरण के लिए देखें।

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -