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

Поділитися
Вставка
  • Опубліковано 12 вер 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 4 місяці тому +1

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

    • @CodingDroplets
      @CodingDroplets  4 місяці тому

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

  • @adamzhang5966
    @adamzhang5966 Рік тому +5

    Very Very Very Very Good Good Good Good !

  • @TheOldMaritimer
    @TheOldMaritimer 10 місяців тому +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  10 місяців тому

      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.

  • @user-lp2hf7kz8r
    @user-lp2hf7kz8r Рік тому +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.

  • @rafaeltabarinbernardes7141
    @rafaeltabarinbernardes7141 2 роки тому +3

    I m from Brazil, very good, Thank you!

  • @AdrDo10
    @AdrDo10 5 місяців тому +1

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

  • @codercoder7270
    @codercoder7270 2 роки тому +1

    You are amazing Man, Well done, thanks a lot

  • @PhilippBayer
    @PhilippBayer 2 роки тому +1

    Very good, Thank you!

  • @alexgolomb363
    @alexgolomb363 11 місяців тому +1

    Thank you. Very helpful.

  • @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?

  • @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

  • @AntonXCMlite
    @AntonXCMlite 2 місяці тому

    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 :)

  • @robsoncardoso8692
    @robsoncardoso8692 7 місяців тому +1

    ty, vai me ajudar muito

  • @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.