0

Here i'm trying to Deserialize xml in dictionary key/values pair.Please help me on this?.

<?xml version="1.0"?>
  <Cars>
    <Car name="BMW">
      <Keys>aaa</Keys>
      <values>12121</values>
    </Car>
   <Car name="Honda">
      <Keys>aaa</Keys>
      <values>12121</values>
    </Car>
     <Car name="Ford">
      <Keys>aaa</Keys>
      <values>12121</values>
    </Car>
   <Car name="Volkswagen">
      <Keys>aaa</Keys>
      <values>12121</values>
    </Car>
     <Cars>
Pratius Dubey
  • 673
  • 6
  • 19
  • 1
    what are the issues that you are getting? – victor Jun 29 '17 at 20:57
  • You gotta post error messages and your code – victor Jun 29 '17 at 20:57
  • 1
    What are the issues? You should edit your question to make it a question? Please read [mcve] – vendettamit Jun 29 '17 at 20:57
  • Possible duplicate of [Converting an XML-document to a dictionary](https://stackoverflow.com/questions/1710193/converting-an-xml-document-to-a-dictionary) – giokoguashvili Jun 29 '17 at 20:59
  • You should check these: (Deserializing xml to object with dictionary)[https://stackoverflow.com/questions/3113248/deserializing-xml-to-object-with-dictionary] and [How to serialize/deserialize to `Dictionary` from custom XML not using XElement?](https://stackoverflow.com/questions/12554186/how-to-serialize-deserialize-to-dictionaryint-string-from-custom-xml-not-us) – Maciej Los Jun 29 '17 at 21:13
  • Thanks for quick response, Anyone can provide the solution according to my requirement or POC – Pratius Dubey Jun 29 '17 at 21:17
  • No we wont do your work for you. – P. Roe Jun 29 '17 at 21:49
  • @P.Roe Please don't work for me just i need your suggestion – Pratius Dubey Jun 30 '17 at 13:29
  • The comments above will put you on the correct path. Once you've coded an attempt or two feel free to post questions about any of the specific errors you're seeing. – P. Roe Jun 30 '17 at 14:18
  • @P.Roe can you please suggest me what will be best approach to parse the above xml to c# in dictionary key/value pair? – Pratius Dubey Jun 30 '17 at 16:08
  • this didn't work for you? https://stackoverflow.com/questions/1710193/converting-an-xml-document-to-a-dictionary – Yuri S Jun 30 '17 at 17:57

0 Answers0