I'm trying to run linq on xml and map to my object type, but some of the fields in the xml don't exist for some records. For example a phone number field exists most of the time for each customer in the xml file, but sometimes that tag won't exist at all. How can I check for the existence or not while mapping the data to my object via linq?
Asked
Active
Viewed 34 times
0
-
2Hope this helps http://stackoverflow.com/questions/12131548/how-to-check-if-a-xml-child-element-exists-with-linq-to-xml – Jumpei May 08 '14 at 02:00
-
1You need to post some code with your question. You should post a representative sample of your XML, your object model, and the code you have already written (even if it doesn't work or even compile). – Enigmativity May 08 '14 at 02:08