Serialize XML C# | Deserialize XML C# [XML Parser C#] - XML to Object C# - List to XML C#

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ต.ค. 2024

ความคิดเห็น • 57

  • @RajiurRahman1
    @RajiurRahman1 ปีที่แล้ว +2

    One of the best tutorials I've ever came across. Thank you.

    • @CodingDroplets
      @CodingDroplets  ปีที่แล้ว

      Thank you so much for the kind words! I'm glad to hear that you found the tutorial helpful.

  • @hemanthreddyveluri8563
    @hemanthreddyveluri8563 ปีที่แล้ว +3

    Excellent explanation! Clearly noted down each and every point and this video is pure gold for beginners like me. Please don't stop making videos :)

    • @CodingDroplets
      @CodingDroplets  ปีที่แล้ว +1

      Thank you so much for watching the video and leaving such a positive comment! I'm thrilled to hear that my explanation was helpful and clear for you, and I'm glad that you found the video to be valuable as a beginner. Your feedback is truly appreciated and encourages me to keep creating content.

  • @sergioalvarado364
    @sergioalvarado364 ปีที่แล้ว +2

    I watched this over and over. Thank you

    • @CodingDroplets
      @CodingDroplets  ปีที่แล้ว

      Thank you, Sergio, for taking the time to watch the video and for your positive feedback. I'm glad to hear that the tutorial was helpful to you.

  • @irenedonati1125
    @irenedonati1125 ปีที่แล้ว +2

    very very VERY helpful! thanks a lot for sharing🤗!

    • @CodingDroplets
      @CodingDroplets  ปีที่แล้ว

      Thank you so much for your wonderful comment! I'm glad to hear that you found the tutorial helpful.

  • @gabymontesvielma7495
    @gabymontesvielma7495 5 หลายเดือนก่อน +1

    Congrats and thank you!!! your video is pretty clear and quite useful !

    • @CodingDroplets
      @CodingDroplets  5 หลายเดือนก่อน

      Thank you so much for your kind words! I'm glad you found the video clear and useful.

  • @rafaeltabarinbernardes7141
    @rafaeltabarinbernardes7141 2 ปีที่แล้ว +3

    I m from Brazil, very good, Thank you!

  • @AdrDo10
    @AdrDo10 6 หลายเดือนก่อน +1

    That helped me a lot!!!
    Thanks for your video!!

    • @CodingDroplets
      @CodingDroplets  6 หลายเดือนก่อน

      You are welcome! Glad to hear that.

  • @TheOldMaritimer
    @TheOldMaritimer ปีที่แล้ว +2

    Great video! Extremely well done!
    Do you have a video on how to serialize/deserialize an XML file that has many child and sub-child elements?

    • @CodingDroplets
      @CodingDroplets  ปีที่แล้ว

      Thank you for your positive feedback! I'm glad you found the video helpful.
      I want to clarify that the structure of your model class should be based on the XML content you're working with. In cases where the XML file has many child and sub-child elements, you'll need to design your model classes to reflect that structure.

  • @adamzhang5966
    @adamzhang5966 2 ปีที่แล้ว +5

    Very Very Very Very Good Good Good Good !

  • @codercoder7270
    @codercoder7270 2 ปีที่แล้ว +1

    You are amazing Man, Well done, thanks a lot

    • @CodingDroplets
      @CodingDroplets  2 ปีที่แล้ว

      Most welcome! Glad to know you liked it.

  • @DmytroSydorenko-k2o
    @DmytroSydorenko-k2o ปีที่แล้ว +2

    Nice video, good luck to you

    • @CodingDroplets
      @CodingDroplets  ปีที่แล้ว

      Thank you for watching the video and leaving a kind comment! I'm glad to hear that you found the video helpful.

  • @alexgolomb363
    @alexgolomb363 ปีที่แล้ว +1

    Thank you. Very helpful.

  • @PhilippBayer
    @PhilippBayer 2 ปีที่แล้ว +1

    Very good, Thank you!

    • @CodingDroplets
      @CodingDroplets  2 ปีที่แล้ว

      Most welcome! Glad to know you liked it.

  • @habibi750
    @habibi750 ปีที่แล้ว +2

    How would one be able to read/get a specific property from the the xml file and use the property as a parameter in a separate method?

    • @CodingDroplets
      @CodingDroplets  ปีที่แล้ว

      need the question to be more specific ..

  • @dilip_1997
    @dilip_1997 ปีที่แล้ว +3

    Hi how do you serialize data that has many sub xml tags

    • @CodingDroplets
      @CodingDroplets  ปีที่แล้ว +2

      Thank you for watching the video and for your question!
      To serialize data that has many sub XML tags, you can use the same XmlSerializer class that was demonstrated in the video. However, you will need to define classes for each level of the XML hierarchy, and use appropriate attributes to specify how the XML elements and attributes should be serialized and deserialized.

    • @dilip_1997
      @dilip_1997 ปีที่แล้ว

      @@CodingDroplets Thank you for replying , would there be any documentation regarding this , my serialization keeps failing for multiple child xml

  • @robsoncardoso8692
    @robsoncardoso8692 9 หลายเดือนก่อน +1

    ty, vai me ajudar muito

  • @AntonXCMlite
    @AntonXCMlite 4 หลายเดือนก่อน

    Does it work with record classes?

  • @Bazs121
    @Bazs121 2 ปีที่แล้ว +1

    Hey, Thanks for the video!
    Is it possible to add another member of a list from user input to the xml file? When I tried it, it deleted the previous members.

    • @CodingDroplets
      @CodingDroplets  2 ปีที่แล้ว

      You can do that. But you need to apply some additional logic to append to an existing file.

    • @Bazs121
      @Bazs121 2 ปีที่แล้ว +1

      @@CodingDroplets Solved it by copying the contents of the xml to the list then flushing the xml, and adding a new element to the list then serializing the whole xml. But with larger xml files this could be a bit resource demanding. Thanks for the answer!

  • @Nickgowans
    @Nickgowans 2 ปีที่แล้ว +1

    Are you from Zimbabwe? Your English is impeccable but my friend is from zim and you have a very similar accent :)

    • @CodingDroplets
      @CodingDroplets  2 ปีที่แล้ว

      Thank You so much. I'm from India.

  • @h.ferruhkaleli9522
    @h.ferruhkaleli9522 2 ปีที่แล้ว +1

    Thank you so much loved your video
    Yet I couldnt solve one problem while deserializing my xml file System.InvalidOperationException: was not expected. i keep getting this error i did some research but couldnt f'x 't do u have any idea of fixxing this by any change thnk you so much

    • @CodingDroplets
      @CodingDroplets  2 ปีที่แล้ว

      Thank you for watching the video.
      Are you using XML Root attribute?

    • @h.ferruhkaleli9522
      @h.ferruhkaleli9522 2 ปีที่แล้ว

      @@CodingDroplets yes i am

    • @CodingDroplets
      @CodingDroplets  2 ปีที่แล้ว

      Please check the below link.
      docs.microsoft.com/en-us/dotnet/api/system.xml.serialization.xmlrootattribute
      Try providing the additional parameters (Namespace, DataType etc) for XML root attribute as mentioned in the example (in above URL).

    • @h.ferruhkaleli9522
      @h.ferruhkaleli9522 2 ปีที่แล้ว +1

      @@CodingDroplets thank you I'm gonna check asap thank you so much

    • @CodingDroplets
      @CodingDroplets  2 ปีที่แล้ว

      Most welcome.. let me know the result.