troubleshooting Question

Retrieve Xml elements using c#

Avatar of mkarthik415
mkarthik415 asked on
XMLC#.NET Programming
2 Comments1 Solution345 ViewsLast Modified:
Hi

How to retrieve the "SampleName","1234","07-07-1977" from the below xml document. I tried loading that into xmldocument and loop but realized that is not efficient as the actual document has many elements.

<?xml version="1.0" encoding="utf-8" ?>
<fC xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.test.com">
  - <fF>
    - <f d:name="a1" xmlns:d="http://www.test.com">
      <d:text>Medha</d:text>
      <d:restriction>REQUIRED</d:restriction>
    </f>
    - <f d:name="a2" xmlns:d="http://www.test.com">
      <d:text>11111</d:text>
      <d:restriction>REQUIRED</d:restriction>
    </f>
    - <f d:name="a3" xmlns:d="http://www.test.com">
      <d:date>07-07-1999</d:date>
      <d:restriction>REQUIRED</d:restriction>
    </f>    
  </fF>
</fC>

Please suggest any resources or sample code.
Thank You
ASKER CERTIFIED SOLUTION
Navneet
.Net Full Stack Developer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros