XmlSerializer: Problems with special characters

I use the  WebClient class to retrieve data in xml format from a URL
(.Net 2.0, C#).
The Code looks like this:

   string url;           // URL which provides the xml data
   XmlSerializer XmlSer = new XmlSerializer(/* Type of the class with
the respective xml structure */); 

   using (WebClient client = new WebClient())
      Stream DStream = client.OpenRead(url);
      XmlReaderSettings xrs = new XmlReaderSettings();
      xrs.CloseInput = true;
      using (XmlReader reader = XmlReader.Create(DStream, xrs))   
         Data = XmlSer.Deserialize(reader);  
         // object Data stores the data

This code works. But there is a problem, if the XML data stream contains
ASCII characters >128. In that case the XmlSerializer object throws an

Is there a way to prevent this?

1/8/2010 8:48:15 PM
dotnet.xml 7266 articles. 0 followers. Follow

0 Replies

Similar Articles

[PageSpeed] 8


Similar Artilces:

Excel date problems
Our company uses a report writer/formatter that creates Excel spreadsheets and then sends them as email attachments to specified users. The data being formatted is coming from a file shipped to the report software from an I5 environment. The data coming in is in the format mmddyyyy but some of the cells in the SS are being converted to ddmmyyyy. When this problem occurs it only happens for months 10, 11, and 12. These dates are being used in calculations so this is a big problem. We are using Excel 2003. Any ideas? ...

Problem sending pictures
I have been trying to send pictures to a friend of mine. Each time I insert the picture and send it it sends 20-60 emails to the person of nothing but text. I've sent pictures before and never had a problem. What am I doing wrong now? Sami We have no idea as you gave us nothing to work with. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the Swen virus, all e-mails sent to my actual account will be deleted w/out reading. After searching google.groups.com and finding no answer Sami <Samirella@cfl.rr.combination> asked: ...

sumif problem #2
I have been using sumif to total cell values from 4 different sheets. Now I added a fifth sheet. So I went into my sumif formula for a cell and added the additional sumif for the new sheet. In the cell that is suppose to show the total, I get ############. what did I do wrong? Thanks! Larger total? -- Don Guillett SalesAid Software dguillett1@austin.rr.com "RPW" <RPW@discussions.microsoft.com> wrote in message news:BB5FA745-9A1C-4E36-A929-EE8D0533F1C6@microsoft.com... >I have been using sumif to total cell values from 4 different sheets. > > Now I added a fi...

Macro problem help please.
Hi all you brain boxes out there. Need some help please. I have a book with about 10 different sheets in it. What I am after is a way to copy the information from a worksheet row to another worksheet without going back and forward cutting and pasting. The macro i was trying to use was this, Sub Macro3() ' ' Macro3 Macro ' ' Keyboard Shortcut: Ctrl+a ' ActiveCell.Rows("1:1").EntireRow.Select Selection.Copy Sheets("POrder").Select ActiveCell.Offset(-4, 0).Rows("1:1").EntireRow.Select ActiveSheet.Paste Sheets("Phot...

Font Size Problem #2
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel I have scanned some text into Word and then converted it all to Times New Roman, font size 12. However some of it is a different size although the program says its not. Even if I change fonts or sizes, that discrepancy exists. How can I get everything the same without having to retype? Hi Dugal; I'm afraid you've left out some significant pieces of information which makes it hard to guess what might actually be going on ;-) First, always indicate your exact version update levels for both Office & OS X...

Synchronization problem with Money 2004
Hi I am running Money 2004 on a PC under Windows XP Home with Service Pack 2 installed. I have recently invested in a HP iPAQ hx2490 and have it set up to synchronize through a USB cradle. Synchronization settings include contacts, calendar, notes, files and Microsoft Money data. All went well until 10th.Feb or thereabouts, when Microsoft Money Data stopped synchronizing, with the message "Attention Required" opposite the Microsoft Money listing. All other data continues to synchronize satisfactorily. HP support tell me that since other data continues to synchronize satisfac...

general question re non numerical character(s) in phone field
I posted a similar question at Skype's forum some time ago but haven't received an answer. Let's say in an Outlook 2007 Contact I wish to denote a mobile phone number as belonging to the spouse of the Contact within the field itself ... H for husband, W for Wife and so forth. If Skype, for example, sees a letter in the field the call is terminated, the reason given - an invalid number. Are there ways to enter non numeric characters in a 'number field' which are then ignored? Thanks, Dave Horne "Dave Horne" <davehorne@home.nl> wrote in message ne...

Outlook Outbox Problem
I have 3 messages in my Outbox that cannot be sent or deleted. Whenever I select my Outbox, it bogs down my computer and I must restart it. One of the messages has an e-mail address thet is no longer valid and my available disk space is very low. I have tried to delete the entries ('X' button delete, Delete button, right click delete, ...), drag them to deleted Items (or anywhere else), resend them, ... without success. I have even gone into Safe Mode and tried everything. All else in Outlook works. What else can I try? Place Outlook in Offline mode; File-> Work Offli...

OWA Redirect Problem
We have two Exchange 2003 Enterprise Edition Servers. They both are backend servers (Hosting mailboxes) and they both run OWA. When a user who has a mailbox on ExServer1 goes to OWA on ExServer2, he enters his credentials, gets redirected to OWA on ExServer1, enters his credentials again and gets to his mailbox. That's great. However, when a user who has a mailbox on ExServer2 goes to OWA on ExServer1, he enters his credentials, gets redirected to OWA on ExServer2, gets prompted for credentials multiple times and receives HTTP/1.1 401 Unauthorized.. All users are fine if they go di...

MFC 7 DDE problem
This is a multi-part message in MIME format. ------=_NextPart_000_00C1_01C3FF17.CEA81B00 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MFC 7 has a bug in WM_DDE_EXECUTE handler of CFrameWnd lstrcpyn(szCommand, lpsz, _countof(szCommand)); line is missing. This is why when the user double-clicks on the Document associated with = app in WindowExplorer nothings happens. Microsoft recommends workaround by implementing WM_DDE_EXECUTE handler in app's CMainFrame and copying there the missing line. Unfortunately it solves the problem only i...

SMTP communication problem #2
We are running Exchange 2003 on a Windows 2003 server. Each day we have no problems emailing between literally dozens of different email addresses and users. However, with one particular user we are getting bounceback emails whenever we try to send them an email. The message reads: There was a SMTP communication problem with the recipient's email server. Please contact your system administrator. <local domain #5.5.0 smtp;554 <recipient email address>: Relay access denied> I have checked to make sure we are not on any RBL. Is there anything I can do on this end to fix th...

Date Format Problem #3
Hello, I've imported a set of data from an external source into Excel. One of the fields is the date and it is displayed in Excel as:- 2003-03-25 11:34:04. When I try to change this however to 'dd-mmm-yy' format there is no change. It also means that calculations based on this date can't be made. If I double click the cell with the '2003-03-25 11:34:04' date (as if I was to edit the contents) and immediately hit enter (thus not making any changes), then the format does change to the 'dd-mmm-yy' format and calculations can be made. Is there any way ...

SP6 Problem
I installed SP6, but now when a program crashes under debug mode, I get a dialog MSDEV,EXE - No Disk There is no disk in the drive Please insert a disk into drive \Drive\Harddisk\DR2 Any ideas ? Open up your computer and check that the disk didnt fall out of the hard-drive - just like the message tells you to. ;-) JoeB "Ian Semmel" <isemmel@removejunkmailrocketcomp.com.au> wrote in message news:AXYcc.2722$8P2.752@news-server.bigpond.net.au... >I installed SP6, but now when a program crashes under debug mode, I get a >dialog > > MSDEV,EXE - No Disk >...

Problem with filter
Hello All I have a form called 'frm prospects' that opens in continuous form view. One of the fields is called 'prospect_notes'. In the form header I have a textbox called 'lookfor' and a button with the following OnClick event: Private Sub Command26_Click() Me.Filter = "[prospect_notes].Value Like '*' & [Forms]![frm prospects]![lookfor] & '*'" Me.FilterOn = True End Sub ... but when I click the button a popup dialogue asks me for the paramater value of [prospect_notes].Value. I have tried variations on the delimiters, and leavin...

MessageSecurityException problem in WCF
Hi, I am writing WCF based application on vs2k8. I wrote Service with name "IService" and expose given operation, [OperationContract] public Result ActionPerform(string function_name, ABase obj) { // FOR TESTING IResult res = null; res = new IResult(ResultStatus.EXCEPTION, new TestException(RelectionLibExceptionCode.CLASS_EXCEPTION, new NotImplementedException())); return res; } 1. ABase is abstract class for all client classes. 2. "function_name" will contain function name that will call by ref...

FUNCTION problem, Please Advise
I have "IF" formula... =IF(C67=G69;M4;0) c69 - number. m4 result if c67=c69 0 if not. When I'm copying that formula (dragging with mouse.. autopaste) I'm getting autochanging in formula =IF(C68=G70;M5;0) ,, =IF(C69=G71;M6;0) a problem is I dont wanna that G69 will change, so it will be in all others functions. How can I do it? Hi =IF(C$67=G69;M4;0) Arvi Laanemets "Nison Maksumov" <maksumov@hotmail.com> wrote in message news:uoCprFxVDHA.452@TK2MSFTNGP10.phx.gbl... > I have "IF" formula... > > =IF(C67=G69;M4;0) > > c69...

SetIcon problem
hi all, i have a button and i want to display a icon of 16*16 size(32*32 is not acceptable) on that. i hane a icon named grey.ico of 16*16. when i use this icon the size become increases by 2*. i was trying to do the following steps- m_hIcon = AfxGetApp()->LoadIcon(IDI_GREY); if (NULL != m_hIcon) { m_icon.ModifyStyle(0, BS_ICON); m_icon.SetIcon(m_hIcon); } Could anybody suggest me what should i do? i have also tried LoadImage. m_hIcon = (HICON)::LoadImage(NULL, "Grey_Ico.bmp",IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE ); but it also not working. thanks for help. Hi, Use Loadim...

Problems with manual filing of hundreds of emails.
I use outlook for 90% of my business, and most of the day revolves around answering and filing emails. Does anyone have any advice for easing the burden of having to drag and drop hundreds of emails from the inbox to their respective folders. I don't want to use the auto redirect feature (under "rules") as this means that everytime i send/receive, i have to scroll up and down perhaps a thousand folders, to find which ones have been graced with a new email; AND I have to create a rule for all the new senders. Inbox is the best way of viewing emails as they come in; the problem...

Publisher problem #2
I have a user that has problems working with graphics in publisher. She gets a message stating that the program is not communicating with the OLE terminal server. She also complains that the computer is operating at "half the speed" it normally does when using publisher. Does anyone have any suggestions what might be causing this error? I have searched the knowledge base and had no luck Please advise. Don't use copy-and-paste or paste-special. Most of the time you don't need this and it WILL slow down things quite a bit. "Gmgoodnight@yahoo.com" <anonymou...

Cannot access Inbox folder! Size problem?
I've been trying to get rid of a large bunch of old Emails by checking into my Inbox from time to time, selecting and deleting or moving a bunch. Now the Inbox folder had gotten so large (545 MB) that I can't even access it to delete old Emails. How can I get access again so I can whittle it down to size? Now I get one of two responses - either the message "FOlder could not be displayed" and I have to reboot or I just see new Emails (today only), but the other 1500 messages in my Inbox are not visible (or scary, they've been deleted somehow??). The file is still...

Publisher 2003 Printing Problem #4
I'm trying to create a booklet (catalog) in Publisher 2003 which I would like to print on 8.5 x11 paper and have each page be 5.5 x 8.5. I would like to be able to print this out so that I can just fold the pages in half and have them line up properly. I cannot print on 11 x 17 and do not want to shrink the size of the pages. Is there anyway to set it up so that pages do not have to be folded twice, just in half, and have it lay out properly....like a book? -- Suse Page setup, booklet... If your default stock is letter, then that is all you need to do. Do you have a duplex unit...

File Option Problem in Outlook 2000
I have a user who seems to have removed the 'File' Option on the Tool Bar when sending a message or reading a message. Can anyone help me? I can't seem to be able to locate it. Thanks Sam View-> Toolbars-> Customize-> tab Commands... Here you can add/remove Toolbar items. You can also use the Toolbars tab to reset the Menu Bar -- Roady [MVP] www.howto-outlook.com Tips of the month: -Setting Permissions on a Mailbox -Create an Office XP CD slipstreamed with Service Pack 3 ----- "Sam" <anonymous@discussions.microsoft.com> wrote in message news:e2...

bizarre excel copy/paste problem
I've had this problem for as long as I can remember with Excel 2000 and upgrading to Excel 2002 has not changed anything. Any input is appreciated. When I copy a cell (ctrl+c) and try to paste (ctrl+v) into the SAME worksheet, Excel will just paste it once and deselect the highlighted cell. That single copy works fine (ie while copying formulas), but it just wont let me paste multiple times. Upgrading Excel has not changed this behavior. Interestingly, MS Word does not seem to have this problem. Also if I use the clipboard, I can paste repeatedly. Does this make sense to anyone? I'...

OL Profile Problems post 2003 Migration
Hi All, I hope some Jedi will be able to help me here. I've recently migrated my EX2K to EX2K3, no problems. With all my users and public folders migrated I thought I'd turn my EX2K services off, and now I'm having problems. It seems my users with Outlook XP are having problems with their Outlook profile referring back to my old EX2K box. If we point their profiles at our old server, they don't hold their settings and and refere back to the old server upon reboot. OL 2003 isn't having this problem, so I'm thinking this version's maybe been updated to look at E...

problems with SP3 Excel 2000, 9.0.6926 SP3
I have frequent freeze-ups with Excel where the cursor cannot click the file closed, click to another worksheet. I frequently have to alt-tab to another app, then tab back into it to be able to select a new cell or a new worksheet, etc. Its almost like the app is locked up until I minimize it and then get back into it again. Anyone have any ideas? Thanks Paul ...