XML Entity problem

Hi,

I am still new to XML and thought I had my solution written, but during the 
rollout, we have come up with a problem with actual XML coming in (as 
opposed to our test XML).

Some character entities have been transmitted unexpectedly.
' and <

I am loading my XML with XmlDocument, just by
XmlDocument xDoc = new XmlDocument();

xDoc.Load(IncomingFilePath + e.Name);

e is an incoming Fileinfo. My XML does not have any declaration at the top 
for a DTD.

I always thought ' and < were understood, but obviously not.

The first line of my incoming XML is <?xml version="1.0" encoding="UTF-8"?>
then it goes straight into the data.

How do I allow my XML document to load and be worked on?

-- 
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available 


0
4/28/2008 8:18:38 AM
dotnet.xml 7266 articles. 0 followers. Follow

1 Replies
1141 Views

Similar Articles

[PageSpeed] 12

Ah,

It looks like it was a prob with the incoming XML. The entities were coming 
through as uppercase, which caused probs.

-- 
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available


"David" <david.colliver.NEWS@revilloc.REMOVETHIS.com> wrote in message 
news:uma9KiQqIHA.1736@TK2MSFTNGP04.phx.gbl...
> Hi,
>
> I am still new to XML and thought I had my solution written, but during 
> the rollout, we have come up with a problem with actual XML coming in (as 
> opposed to our test XML).
>
> Some character entities have been transmitted unexpectedly.
> &apos; and &lt;
>
> I am loading my XML with XmlDocument, just by
> XmlDocument xDoc = new XmlDocument();
>
> xDoc.Load(IncomingFilePath + e.Name);
>
> e is an incoming Fileinfo. My XML does not have any declaration at the top 
> for a DTD.
>
> I always thought &apos; and &lt; were understood, but obviously not.
>
> The first line of my incoming XML is <?xml version="1.0" 
> encoding="UTF-8"?>
> then it goes straight into the data.
>
> How do I allow my XML document to load and be worked on?
>
> -- 
> Best regards,
> Dave Colliver.
> http://www.AshfieldFOCUS.com
> ~~
> http://www.FOCUSPortals.com - Local franchises available
> 


0
4/28/2008 9:15:43 AM
Reply:

Similar Artilces:

setting timeout in XML controls
Is there a way to set a timeout in either MSXML or in .NET's XML classes? --Buddy Hi, If you're using MSXML4.0 take a look at the ServerXMLHTTP: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/htm/xml_mth_sz_0cj7.asp Regards, Ion Vasilian -- This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm. "Buddy Ackerman" <buddy@buddyackerman.com> wrote in message news:uHqaoAkmDHA.2068@TK2MSFTNGP09.phx.gbl...

Background problem
I would like to add a background to a Visio drawing. But whenever I try dragging a background (from the background stencil) to my drawing, the background appears in the *corner* of my diagram only. I think that this has to do with the orientation of the page. My drawing is portrait and the background appears to be landscape. I tried to copy-and-paste the background. This appears to work (the dragged background fits over my drawing perfectly) but then hides my drawing! And I can see how to bring my drawing to the foreground. Visio is a nice programe - with a bad interface and help system. ...

The problem with Moneydance
The problem with stuff like moneydance, is it's basically a hand full of people working on it. Support is hard to obtain, only via email. All imports I've done have been way, WAY off. Every Account needed massive tweaking. Documentation barely there. Entering transactions are a little confusing too. Quicken is really bloated. I have a few simple things to track 1. Credit cards 2. (2) checking accounts 3. Savings account 4. Wife's 403B 5. My 401k 6. (2) oppenheimer accounts. I don't really use budget planning reports, or anything like that. I run the monthly r...

Problems installing IM on server
We recently upgraded to Dynamics GP 9.0, when we tried to upgrade/install integration manager on the server, it refused to complete the install and rolled back the installation. However when we installed it on a client machine, the installation/upgrade went through without a hitch. Why am I having a problem loading it on the server? I've never loaded IM on the server. Only on workstations. The only thing that should be on the server for IM is the IM Database for shared access. "Leni" wrote: > We recently upgraded to Dynamics GP 9.0, when we tried to upgrade/install ...

problem creating report
I have 15 working forms from 2 diferant colums from one table what I want is to run each query on its own line of a report with 4 calculations at the end I can select 1 query and produce the first line but how do I move to second line and query? thanks Duane Hookom wrote: > This is a really unusual question. What do your forms and columns have to do > with your queries and report? > > A report can have only one record source. This record source could be a > union query. You can also use subreports to display additional queries. > thank you ...

Conditional Formatting Problem #7
Is there a way to make conditonal formatting work when there is a formula in the cell? Conditional foramtting works if there is no formula in the cell. If one sheet is linked to another that doesn't work either. Is there a way to get around this? Under conditonal formatting there is a conditon "formula is." What would you put in there to have the cell format they you would like? There are two different things: a) the cell, containing a cell formula, a value or nothing b) the condition, containing a boolean formula (formula is) - b) can refer to a), but a) referring to a...

Form Header Control problem
I have a form based on a query that displays fields in the form header and data is entered in the detail section. When I use the record selector to go through the records the data in the detail area is updated but not the header section. I added the header section so that I could insert a tab control at the top of the detail section. Thanks in advance for any input. ...

DTD ?? and Errors when trying to Retrieve / Read a generated XML f
Hi All Hope someone can help. Using WebRequest.Method = "POST" and ContentType = "application/x-www-form-urlencoded" I connect to a web application which then is expected to return me an XML file ie It is generated and returned rather than existing as a file in a location. my webrequest reads as... http://webedu/webct/public/serve_webctdb?OPERATION=homearea_xml From the Browser I get this returned <?xml version="1.0" standalone="no" ?> <!DOCTYPE homearea (View Source for full doctype...)> - <homearea base="http:...

Outlook 2003 Cached Mode problems
I have a client who successfully connects to an Exchange server using Outlook 2003 in Cached Mode. All with the exception of one is working fine. This particular user, all of a sudden is unable to connect. Symptoms started with new messages not appearing. With Cached Mode off all is fine but as the server is remote it is deadly slow. The OST has been deleted, the Profile has been created, Outlook has been repair, and even uninstalled and reinstalled, but always the same problem. The Calendar and the Contacts sync fine, then early on through the Inbox it stops. Nothing else syncs. I have...

Field text range problem
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: Power PC In my applescript, I need to find out if the user has put the cursor in a field at the time the script is run. <br> There is no inField function and I can't seem to get a (start of / end of) text range of a field relative to the start of the document, for each field when looping through all the fields. <br> I realize that text ranges contain fields. This makes it confusing that I am trying to find a text range or selection object that may be in a field. <br><br>Here is a little scr...

Problem with data using IF and Nested IF statements possibly???
Afternoon All I am attempting to analyse data from multiple worksheets from numerous people the incoming data all has one thing in common column A this is a certain frequency a job is done. The problem is that there are many ways of entering the data ie 12 months or 52 weeks or 365 days all essentially meaning the same thing. My idea is to collate the data in col A and then using the Helper column as the standard frequencies ie if cell A1 = 12 months, closes frequency in helper is 52 weeks therefore value in C1 = 52 weeks. By using an IF statement I can change the value of one frequen...

Entity framwork accessing private member variables
(The following was posted in the ADO.NET newsgroup but got no responses. Thus the posting here.) Doing some testing with Entity Framework, I have been able to get POCOs to save using the public Properties. Now I am trying to switch from using public properties to private member variables. Originally the getter and setter of the ID property were public. I have changed the getter and setter to private access and changed the name to 'id' the name of the underlying member variable. I get an error: "Mapping and metadata information could not be found for Entity T...

Activities Follow-Up Problem
When I create a new phone call activity through the activities of a Lead, the Sender, Recipient and Phone Number fields are populated. However, when I create a phone call using the "Follow-Up" option from within the lead or another activity, that information does not come over . This is a real pain, because the beauty of the "Follow-Up" feature is that you don't have to go back to the activity list to add calls. Any Ideas why this happends ? Thanks Hi Carlos, I know that's the pain and I have seen that problem before at different clients. first I think t...

problem Opening jpg's only
Recently, in Outlook 2003, I noticed that I can';t open and view jpg's anymore. Other attachements (mpg, pdf) are fine. I get the message: 'The system cannot find the file specified' I can save the file to disk and can view it easily just by clicking on it. It happens whether McAfee antivirus is enabled or disabled. I don't think it is level 1 attachments which are being blocked as in Microsoft Knowledge Base Article - 829982. Any ideas would be appreciated. Thanks Craig I am having the same issue. Any suggestions would be helpful! Thanks Jeremy >-----Original M...

problem...
When I am sending an email with an attachment of size 11mb for instance, I can not cancel the transmission. When I try to open the concerning message in the outbox, outlook says you can not open the item, it is being transmitted... Nor can I delete it. I hate this problem and cant solve it. Please guide me. Running against Exchange server or with a local data file? -- Russ Valentine [MVP-Outlook] "exciter" <t24680@hotmail.com> wrote in message news:%23FeC9c8hGHA.3408@TK2MSFTNGP05.phx.gbl... > When I am sending an email with an attachment of size 11mb for instance, >...

Hyperlink problem to cell in same workbook
I have a hyperlink created by a VB program that should link to a cell on a different worksheet within the same book. The hyperlink code currently is as follows: =HYPERLINK(ADDRESS(4,2,1,FALSE,"MultipleAliases"),"MULTIPLE DP ALIASES") MultipleAliases is a separate worksheet and I want the link to jump to row 4 cell 2 on this sheet. I realise that normally you need a spreadsheet identifier as part of the worksheet definition, thus the "MultipleAliases" would be "[FILE1.XLS]MultipleAliases" if this was saved as FILE1.XLS. If I do save this file wi...

Outlook Express Mail Rules Problem
Hi, I'm using OE 6.0 on my home system and have a number of rules setup to either move incoming mail to specific folders or to delete it based on subject or message content. The delete rules are the last ones in the list. I've recently changes a couple of rules and now I find mail being deleted which should have been moved into a folder. The rules look okay. Is there a registry key or a file somewhere in the system which might be the problem? TIA Bernie -- bernie@ms-training.org.uk MS Training and Consultancy http://www.ms-training.org.uk Since Outlook Express is part o...

Attached file problem
Outlook 2003 refuses to open an attachment sent to me with the name Confirmation.rtf giving out the message: "Cannot create file: Confirmation.rtf. Right click the folder you want to create the file in and then click Properties on the shortcut menu to check your permissions for the folder." However if the same file is sent with a different name (say confirm.rtf) then Outlook is quite happy to open it! I have hundreds of emails in my Sent Items folder each with an attachment called Confirmation.rtf - could this be the cause of the problem? Incidentally I can't open any of...

Merge Problems
I'm not sure if this question should be in word or excel forums, so let me know. I have created a spreadsheet that pulls data from an excel sheet to complete the merge in word. One of the cells that transfers over is a formula that calculates a score. I want the merge to show the number that's in the cell. The cells are formatted to show through one decimal space. When I merge over, it shows the entire number that excel calculates. I can't figure out if I need to change the excel cells, or the word merge document to just show the numbers through the first deci...

Email routing problem
Hello all, I would appreciate advices for the following scenario. I have three mail servers responsible for SMTP address spaces A, B, and C. Only server A is public. It is being used as a front-end SMTP router and also runs anti-spam and anti-virus. Servers B and C host mailboxes for two overlapping sets of users - I mean that some users have mailboxes on both servers and connect to either one depending on what computer they are using. Only server B is Exchange 2003; server C is just a third party IMAP server. Server A is Sendmail and runs on Linux. It is configured to forward all incoming em...

what's the problem with online quote server?
For the past month or two, it's unavailable most of the time. Money keeps telling me to check my internet connection, which is not the problem. I have tried updating prices online at different days of week and different times of day, but I think the success rate is less than 10%. ...

Printing problem with the excel 97 to Excel XP
After i made a worksheet using Excel 97 and print it. I copy that file and opened it in excel XP and print it, but my problem is the spacing which is not the same as it was using excel 97. If you changed your operating system at the same time that you upgraded Excel, you may need a new print driver. Go to the printer manufacturer's web site, and check for downloads available for your printer and operating system. anonymous@discussions.microsoft.com wrote: > After i made a worksheet using Excel 97 and print it. I > copy that file and opened it in excel XP and print it, but ...

Problems printing from Publisher
This is wierd. Any document I print fro Publisher to my Panasonic KX-P7100 laser printer gets enlarged by a factor of four or more - so it only prints out the top left hand corner (but enlarged). None of the other programs on the computer do this. I've installed all the updates and I've got the most updated drivers for the printer. Any suggestions? Maybe uninstalling and reinstalling the printer would help. Panasonic has an utility that will remove all the printer files. Starting fresh could be a solution, Publisher is more demanding on printer issues than most applications. ht...

scroll bar problem
When I left click and drag the horizontal or vertical scroll bars in Excel , nothing scrolls. All I get is a pop-up box that indicates a row or column # (and then movement after releasing the left mouse button). Scroll works fine on web pages. Any ideas? That's the normal Excel scrollbar dragging behavior up thorough Excel 2000. Starting with Excel 2002 the scrolling was real time. -- Jim Rech Excel MVP ...

Problem after MS Update KB978207
Hi All, After installing KB978207 we found we had no network connection and IPSec eventId: 7023. Has anyone else installed this yet or found a solution to this? Thanks, Nick My guess is this is that old DNS reserved ports issue that can happen randomly on any reboot and has nothing to do with KB978207. Make sure you add the DNS reservation patch to fix your IPSec booting issue: http://msmvps.com/blogs/bradley/archive/2009/03/11/sbs-2003-and-dns-patch-issues-revisited.aspx -- Allan Williams Nick wrote: > Hi All, > > After installing KB97820...