2 Replies - 143 Views - Last Post: 07 February 2012 - 07:10 PM Rate Topic: -----

Topic Sponsor:

#1 Nerfpl  Icon User is offline

  • D.I.C Head

Reputation: 38
  • View blog
  • Posts: 154
  • Joined: 15-January 12

Specific serialization structure?

Posted 07 February 2012 - 05:14 PM

Hi

I build certain class and it will be used as data container for XML data. I have few questions

1.How to create & apply structure for XmlSerializer? For example Filed A and B in "Some" node, C and D in "Other" node.
2.How to make it so it will ignore default values (and how to point to them) Atm my class have fields for example: "A" and "A_Default", "B" and "B_Default" etc.
3.I load this class into Property Grid. Is there also some way so property grid will indicate which values are not default?

This post has been edited by Nerfpl: 07 February 2012 - 05:18 PM


Is This A Good Question/Topic? 0
  • +

Replies To: Specific serialization structure?

#2 Sergio Tapia  Icon User is offline

  • Is that a raincoat?
  • member icon

Reputation: 1012
  • View blog
  • Posts: 3,816
  • Joined: 27-January 10

Re: Specific serialization structure?

Posted 07 February 2012 - 06:56 PM

I've read your question three times and don't quite understand it. Can you edit it, and try to dumb it down a bit more?
Was This Post Helpful? 0
  • +
  • -

#3 Nerfpl  Icon User is offline

  • D.I.C Head

Reputation: 38
  • View blog
  • Posts: 154
  • Joined: 15-January 12

Re: Specific serialization structure?

Posted 07 February 2012 - 07:10 PM

1. XmlSerializer creates XML file from class (saves it) in certain format (properties naming etc), how i can change this format?
2. How i can set up this XmlSerializer so it would preform some check on serialization to decide which fields/properties write.
3. Is there a way for Property Grid to somehow compare properties? Main thing is i have no idea how it extract properties with their names etc. I need to preform a check is given property at it's default value
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1