XML Custom serialization

Hi all,

I want to serialize a class in a customized way. But I don't want to
implement the ISerializable interafce because I don't want to take
care of every new field I insert to the class.

What I need is a way to customize the serialization of a specific
field in my class but leave the rest to the build-in serialization.

Any guidance will be appreciated.
Ro'ee
0
sfa.roy (1)
4/1/2008 7:21:32 AM
dotnet.xml 7266 articles. 0 followers. Follow

1 Replies
899 Views

Similar Articles

[PageSpeed] 59


<sfa.roy@gmail.com> wrote in message 
news:7243a1eb-3fa3-43e0-8339-d90f890e6716@b1g2000hsg.googlegroups.com...
> Hi all,
>
> I want to serialize a class in a customized way. But I don't want to
> implement the ISerializable interafce because I don't want to take
> care of every new field I insert to the class.
>
> What I need is a way to customize the serialization of a specific
> field in my class but leave the rest to the build-in serialization.
>
> Any guidance will be appreciated.
> Ro'ee
Well you can change some of the behaviour using attributes on the field but 
only to a limited extent. What do you want to do?

-- 

Joe Fawcett (MVP - XML)
http://joe.fawcett.name 

0
4/17/2008 2:31:10 PM
Reply:

Similar Artilces:

SOS! how do I write a customized function to do multiple-value lookup in Excel 2007?
I have two regions in exact same places of sheet 1 and sheet 2, I want to find all cells in the region in sheet 1, with cell content equal to 0, and then add the numbers at the corresponding locations in the region in sheet 2 up. For example, let's say in the region in sheet 1, there are multiple locations where the cell content = 0: A1, B3, C4, D2, etc... I would like to obtain sum(sheet2!A1, sheet2!B3, sheet2!C4, sheet2! D2), etc. How do I do that? I want to write a user customized function for that: The regions in sheet1 and sheet2 are fixed to be D7 to Z20. So the first step is to fi...

need to be able to set security on the buttons on the custom keybo
need to be able to set security on the buttons on the custom keyboard especially the minus key . any user can refund an item. when the minus key is pressed it refunds an item this is a security issuse as the user can then press the plus symbol and the item can be refunded multiple times. these action buttons need to be locked down and potentially a report should be availble to the administrators so they can see staright away which items have which security levels assigned against them .To hard to try and track each shop as they all require different keyboards and differtent security s...

Customizations not working
I added a few items to the industry drop-down box for Accounts and Leads. I save them, but they do not show up under the account's drop-down menus. If I go back into the settings, they are there. Am I missing a step? Tareef Hi Tareff - You need to publish you customizations via deployment manager And once you have published the customisations, run IISRESET on the CRM server "warrior2k@gmail.com" wrote: > Hi Tareff - > > You need to publish you customizations via deployment manager > > Hi, Using Deployment Manager, publish your contents, Also take the ...

XML Header
Hi, I have some XML doc loaded in a C# Web Service. XmlDocument doc = new XmlDocument(); doc.LoadXml(myDoc); Code Missing to manipulate header (I would like to replace or manupulate all these XXXXX): <mso-XXXXXX productversion="XXXXXX"> <mso-application progid="XXXXX"?> doc.Save(myNewDoc); Any idea on how to access and manipulate data within the doc header? Thanks vbdev vb6dev2003 wrote: > I have some XML doc loaded in a C# Web Service. > XmlDocument doc = new XmlDocument(); > doc.LoadXml(myDoc); > > Code Missing to manipulate header ...

Can you put an alert on a customer?
We have had a customer write bad check with us. He's since paid us, but he was not all that cooperative in getting payment to us to cover the check. We are hapy doing business with him if he's paying with cash or credit cards, but don't want to take checks from him. Is there any way to either have: A) an alert pop up when his account is selected statinf that checks are not allowed, or B) make it impossible for checks to be accepted on his account? Hi Meralee, Would you be interested in custom alert solution?. if so please drop a email. Regards, nj.tech@hotmail.com "...

Radiant 1510 with samsung 350 serial printers
good day, Has anyone ever tried using Radiant 1510 Touchscreen moniters with samsung 350 serial printers......I am having some trouble being able to print....i have triend both the opos and windows drivers....any help would be greatly appreciated.... Best regards, Uttam Using a serial printer might be your problem. If you look through past threads you will notice a lot of the problems listed with printers show up with a serial connection. It seems to be much better to use either LPT1 or USB. You might want to consider a Serial to USB adapter and see if that works. Craig "...

Easy way to display custom entities?
Is there an easy way to display any entities that have been created or customized outside of the default entity set that comes with CRM 4.0? -- Thanks and have a great day! Mike Mike, If I were trying to find this information, I would go to Settings -> Customization -> Customize Entities and sort by type. This will group custom entites and customizable entities together. I don't know of a way to tell whether a customizable entity has been customized, though. Regards, Dan "Mike" wrote: > Is there an easy way to display any entities that have been created or ...

Read XHTML into XML
Hi all, I need to read/parse XHTML aspx pages and look for certain tokens and content. How can I use a XmlTextReader for this? If not, any other ideas? Thanks in advance, JA Reyes. Jose Antonio Reyes wrote: > I need to read/parse XHTML aspx pages and look for certain tokens and > content. How can I use a XmlTextReader for this? If not, any other ideas? If the pages are well-formed XHTML then it is possible to use XmlReader (in .NET 2.0/3.0) or XmlTextReader (in .NET 1.x) to parse the XHTML documents. You can also use the other XML APIs .NET provides so using XPathNavigator and/o...

Serial port
Hey, I've got an application (VC6), which must communicate with the serial port (com port). I use ReadFile, WriteFile with Non-overlapped mode. There's a thread, which is only for the reading. The problem: Missing data. Does anybody knows, how the input/output buffer of the comport is realizied? When there come more data over the ComPort then the Software reads out, what happens? Does anybody had some advices? Thanks Peter There are a variety of ways to set up reading a commport, but in general you= have to use overlapped IO. The comm port driver in effect puts data in y...

How to invoke the xml editor?
I installed vs2005 on a new xp pro machine, and installed everything except C++. When I click on a file with a ".xml" extension it is opened with IE. When I click file/Edit with XML Editor, it opens it with Notepad. If I click File/Open With and select XML Editor, it opens it with IE. So, where is the xml editor? Can it be invoked from withing VS? Where? Bill * billsahiker@yahoo.com wrote in microsoft.public.dotnet.xml: >I installed vs2005 on a new xp pro machine, and installed everything >except C++. When I click on a file with a ".xml" extension it is >opened ...

Sorting in a custom view not functioning as expected
I just can't shake the feeling this is a stupid question, but I can't seem to get it or find an appropriate Google response. I have saved a custom view for my tasks. In it, I have a custom sort set up for my tasks. (A custom field text field "Grouping" ascending, then "Status" descending, then "Due Date" ascending, if you want to know.) My problem is, it's often convenient to look at things by category, so I (and my little users) click on the "Category" heading to get a quick view of things sorted that way. Then, I want to...

auto fill in customer when contact selected
Hello, I hope Bertil reads this :) or someone with the same knowledge :) In a case when a user selects a contact is it possible to auto fill in the customer related to the contact?? Any help mucho appreciated. You can do this using javascript. onchange function of the field. -- Regards, MS CRM Certified Professional http://microsoftcrm3.blogspot.com Chat with me on MSN / Gmail / Skype : ID Is :.. mscrmexpert@gmail.com "Ian" wrote: > Hello, > > I hope Bertil reads this :) or someone with the same knowledge :) > > In a case when a user selects a contact...

Custom colors
I hope someone can help me out on this one please! I mixed a few new colors using RGB that I want applied to certain cells on a spreadsheet that will be shared among many users. The problem is, I noticed that setting RGB only changes the color pallette and if the user resets or changes their color pallette, then my colors are all reset on the spreadsheet (and they look bad!). Apparently its all linked by the color index? i.e. If the user changes their color index, that change updates the spreadsheet color. Is there is foolproof (or at least better) way of applying custom shading t...

Turn Off the Right-Click Customize option?
I am using Access2003 and, I need to turn off the Right-Click Customize option on my toolbars. I was told I could use /runtime in the command line and it would turn off the Right-Click option. But it didn't work. Any suggestions? On Jun 26, 10:25 am, Anoymous <Anoym...@discussions.microsoft.com> wrote: > I am using Access2003 and, > I need to turn off the Right-Click Customize option on my toolbars. > I was told I could use /runtime in the command line and it would turn off > the Right-Click option. But it didn't work. > > Any suggestions? Look around your s...

show XML schema and values
I have an XML document that looks like the following: <record> <Field1>value1</Field1> <Field2>value2</Field2> <Field3>value3</Field3> </record> What I'm aiming to do is to show the data in a report as in the following example: record: Field1 value1 Field2 value2 Field3 value3 The "Field1-3"-elements can have any name, so I'm trying to get a table that has in one result column the element name, and in the second colum...

XML Serialization ... how to truncate <?xml...
While xml serializing object how can I truncate <?xml ...?> this line alone? I need to send the serialized xml data to a web method ... since SOAP already have <?xml tag there was some confusion Any help would be greatly appreciated Thank you Regards Raj Raj wrote: > While xml serializing object how can I truncate <?xml ...?> this line alone? Serialize to an XmlWriter created with XmlWriterSettings where you set OmitXmlDeclaration to true. -- Martin Honnen --- MVP XML http://msmvps.com/blogs/martin_honnen/ ...

How do I create the correct size/type custom icon for custom entit
Can any one tell me what exactly do I need to do to create a custom entity icon. I know how to upload the file but how do I create the file in the first place. I have done this using Paint but it always appears as truncated or clipped around the side or far too small. Thanks for your help You can use paint to create icons - but MS recommends that the files cannot be bigger the 10 Kb and should have transparency for best resuls. To draw a transparent image in MS Paint, on the Image menu, click Draw Opaque and make sure the check mark does not appear next to it. Hope this helps. I...

problem when transferring out serialized item
we have a serialized item that was returned by a customer, and was placed into offline inventory. i went to offline inventory and transferred the item out, we did a standard transfer type (we are sending the item back to the supplier). after doing that, i went to the transfer out order, and selected issue all, and tried to commit to it. i get the error message "the following serial number exists in the database, and is not available for issuing: 04215494019" i checked this serial number in the serial table, and the status of the serial number is set at 3. we've never...

Offline synch using XML web-services
This is a bit long-winded. Can somebody read thru these 2 use cases, and tell me if it is feasible ? :- Use Case : Replication before Offline Synch Scenario 1 : Oracle Server , MSDE client 1. User clicks on 'Go Offline'. System creates a MSDE SQL database in laptop (client), gets the schemas of the tables in Oracle, creates corresponding tables in client's MSDE SQL (mapping Oracle datatypes to SQL datatypes). 2. Offline replication program reads in the tables of the server into a typed datasets, converts the typed datasets into XML, and stores the XML in the client. (XML serial...

Can I create a custom MIME player within Outlook and Outlook Express?
I have a special SMTP e-mail from a custom server that is encoded as text/myapp-xml. I would like to create a control to format it within Outlook and Outlook express instead of displaying raw XML. I used the MSDN mime player example and can view the text/myapp-xml content in a web page within IE fine, but within Outlook and OE, it is just text. Is there some special registration I need to do to get the OCX mime player to work in O/OE? Below is what the e-mail looks like. Any tips/help are appreciated. jmw ------------------------------- Return-Path: From: To: Subject: Mime-Version: 1.0 ...

Custom Autonumber Conditional Formatting
To, The EXPERTS, ( Access Dept.) I am New to access but have managed to make a database for my patients records , my trouble is the Registration Number of the Patient,( a cloumn in my database). i want it to generate the unique ID just llike AUTONUMBER, with the format i need that should be like YYMMnn( YY= present year,MM= present month and nn = numbers 01 to 99, with reset to 01 at the start of the next month)the event to trigger the event is SAVE Form button. please can anybody help? Thanking you in advance To, Mr.Klatuu Thanks for your Promt help... I will try to put this into use i...

String to xml document
Hi there, I was hoping someone can help me with a little problem I can't seem to find any answers to. I've got a form wich will be posted. On receiving the post I would like to parse a formvar to a xml document. The contents of this formvar (string) will be a valid xhtml document. Can someone give me a startertip (or more :-)) on how to achieve this? tnx in advance, James van der Veen Sjeems wrote: > I was hoping someone can help me with a little problem I can't seem to find > any answers to. > > I've got a form wich will be posted. On receiving the p...

Change salesperson for mutiple customers
We fired a salesperson and hired a new one, I want to do a mass change on the customer cards to put in new salesperson. I don't want to enter each change individually. Unless they fit neatly in a customer class, you will probably want to use a tool to update the records. You could use a SQL query (Update RM00101 set slprsnid = 'new' where slprsnid = 'old' and Update RM00102 set slprsnid = 'new' where slprsnid = 'old') or MS Access or some other tool. -- Charles Allen, MVP "allisons" wrote: > We fired a salesperson and hired a new on...

Marking Customers Inactive based on last transaction date
Is there a way to mark customers inactive based on the date of their last transaction. For example make all the customers that have not ordered within the last year would be flagged inactive. If there is not an automatic way to do this, is there a last transaction date in the DB that I could use to create a sql script on the customers that meet the criteria? Regards, Bill Bill: I looked at the RM00103 table (summary table) and it holds a field called LSTTRXDT which is last transaction date so I would think you could go ahead and build an update statement on the RM00101 and set the INA...

Beginner of XML
I am a beginner of XML. I want to group some files together with a xml file. (it includes a text file, and an image file and a video file) Can someone show me some guidelines? Please help. ...