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

Поделиться
HTML-код
  • Опубликовано: 24 авг 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 3 месяца назад +1

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

    • @CodingDroplets
      @CodingDroplets  3 месяца назад

      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!

  • @adamzhang5966
    @adamzhang5966 Год назад +5

    Very Very Very Very Good Good Good Good !

  • @AdrDo10
    @AdrDo10 4 месяца назад +1

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

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

  • @codercoder7270
    @codercoder7270 2 года назад +1

    You are amazing Man, Well done, thanks a lot

    • @CodingDroplets
      @CodingDroplets  2 года назад

      Most welcome! Glad to know you liked it.

  • @alexgolomb363
    @alexgolomb363 10 месяцев назад +1

    Thank you. Very helpful.

  • @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  9 месяцев назад

      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.

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

  • @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 7 месяцев назад +1

    ty, vai me ajudar muito

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

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

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