Solved

deserialize ignoring complte tag in xml

Posted on 2011-03-03
3
369 Views
Last Modified: 2012-06-27
Can anyone please help me how to deserialize xml ignoring couple or xml elements.

Problem.

Some of the xml elements are encrypted. Before i can decrypt i have to deserialize rest of the xml.

any help.
0
Comment
Question by:NetSri
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 35029406
If you class doesn't have a property to represent a particular element, it should be ignored. If it does, however, and you still want to ignore that field, you can apply the XmlIgnore attribute to that particular property:

    http://msdn.microsoft.com/en-us/library/system.xml.serialization.xmlattributes.xmlignore.aspx
public class Book
{
    public string Title { get; set; }
    public string ISBN { get; set; }

    [System.Xml.Serialization.XmlIgnore()]
    public int PageCount { get; set; }
}

Open in new window

0
 

Author Comment

by:NetSri
ID: 35325103
Thank you very much , solved it
0
 

Author Closing Comment

by:NetSri
ID: 36158009
Thank you
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question