Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How to avoid empty node to appear in xml file while doing xml serialization

How to avoid empty node to appear in xml file while doing xml serialization

Scheduled Pinned Locked Moved C#
xmljsontutorial
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Shiby
    wrote on last edited by
    #1

    When I xml serialize a file, I want all the empty node should not appear. e.g. The below mentioned xml serialized file has empty region node. abc I want empty node should not appear in xml serialized file. abc I appreciate, if anyone has any solutions or suggestions to this, please share their knowledge. Regards, Shiby

    L 1 Reply Last reply
    0
    • S Shiby

      When I xml serialize a file, I want all the empty node should not appear. e.g. The below mentioned xml serialized file has empty region node. abc I want empty node should not appear in xml serialized file. abc I appreciate, if anyone has any solutions or suggestions to this, please share their knowledge. Regards, Shiby

      L Offline
      L Offline
      leppie
      wrote on last edited by
      #2

      You cant do that with XML serialization. You will have to post process the xml file manually. XML Serialization wasnt designed for readability. xacc-ide 0.0.15 now with C#, MSIL, C, XML, ASP.NET, Nemerle, MyXaml and HLSL coloring - Screenshots

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups