473,811 Members | 1,788 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Unusual characters in XML document cause xml load problem

Joe
Hi,

I want to save some URLs into a XML formatted document.

I find out that its having some problems due to some of the characters used
in the URL.

Is there a quick way to get around that? Thanks.

Here are some of the URL characters in the parameters

www.site.com/='N+Ss+Volume'& sym=

http://www2.site.com/

http://www.site.com/.?scanType=all_s...ange=all_&x=14
Feb 5 '06 #1
2 1598
Joe
Are there any easy to use prewritten code to take care of this (the special
characters used in the URL I need to store in the XML formatted are causing
load and read problems with the XMLdocument object)?


"Joe" <jo*******@yaho o.com> wrote in message
news:uK******** *****@TK2MSFTNG P15.phx.gbl...
Hi,

I want to save some URLs into a XML formatted document.

I find out that its having some problems due to some of the characters
used
in the URL.

Is there a quick way to get around that? Thanks.

Here are some of the URL characters in the parameters

www.site.com/='N+Ss+Volume'& sym=

http://www2.site.com/

http://www.site.com/.?scanType=all_s...ange=all_&x=14

Feb 5 '06 #2
Joe,

You can encode the characters, using HTML encoding.

Or, you can place the data in a CDATA section.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Joe" <jo*******@yaho o.com> wrote in message
news:uK******** *****@TK2MSFTNG P15.phx.gbl...
Hi,

I want to save some URLs into a XML formatted document.

I find out that its having some problems due to some of the characters
used
in the URL.

Is there a quick way to get around that? Thanks.

Here are some of the URL characters in the parameters

www.site.com/='N+Ss+Volume'& sym=

http://www2.site.com/

http://www.site.com/.?scanType=all_s...ange=all_&x=14

Feb 5 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1883
by: Ken Tuck | last post by:
Hi The following functions are working propery for IE, Ns 4.x and NS 6+ but the image I want to display disappears in IE. Why? function swapPic(layer,imgName,imgObj) { o = (n && layer?document.layers.document.images:document.images); if(!o.hasswapped) o.src = eval(imgObj+".src"); }
1
3556
by: Chief | last post by:
I am unable to load an xml document that contains Chinese characters in an attribute value. I need to load the document into and XmlDocument object and am using the XmlDocument.Load(string filename) method. I get an error that says the document contains invalid characters. The document loads fine with Chinese characters in a node value, but not in an attribute value. I have tried setting the encoding to UTF-8 and UTF-16, but neither solve...
2
3701
by: Joseph | last post by:
Hello. I have this problem. See I have a transformed XML file and I checked its contents prior to outputting it to excel file via responseset. here is the gist of the code: XmlReader reader = myEsiCommand.ExecuteXmlReader(); reader.MoveToContent(); string myCSV = reader.ReadInnerXml(); //Load the xml fragment into the document XmlDocument xmlDataDoc = new XmlDocument();
8
3716
by: david.lindsay.green | last post by:
Hello all, I am quite new a web scripting and making web pages in general and I have stumbled across a problem I have as yet been unable to solve. I am trying to take the contents of a textarea box and save it to a file. This step is not to hard however the contents of the textarea is mostly latex source so it contains just about every special character you can imagine. My question is this, how do I save an exact copy of the textarea...
7
7184
by: Nadav | last post by:
Hello, When I create an XML header using this code: XmlDeclaration header = doc.CreateXmlDeclaration("1.0", "UTF-8", null); XmlElement rootElement = doc.DocumentElement; doc.InsertBefore(header, rootElement);
7
4924
by: Trac Bannon | last post by:
When I load XML from a file into a dotNet XMLDataDocument, the UTF-8 codes are resolved but the 5 special XML entities are not. How can I force those 5 special character types to be translated?
10
13981
by: lamxing | last post by:
Dear all, I've spent a long time to try to get the xmldocument.load method to handle UTF-8 characters, but no luck. Every time it loads a document contains european characters (such as the one below, output from google map API), it always said invalid character at position 229, which I believe is the "ß" character. Can anyone point me to the right direction of how to load such documents using the xmldocument.load() method, or...
1
3196
by: wenijah | last post by:
Hi everyone! First thank you for reading this post and yes, you probably already see that kind of topic title somewhere but the problem I've got today might be different than the 100 topics I've seen so far that did not resolve my problem... Environment and problem: I have a page A with Ajax.js and a <div id="ajx">Content</div> that changes when clicking on a link. Another page, page B, gets loaded into page A and (tries) to load a...
3
4188
by: ManWithNoName | last post by:
Hi! I am trying to load files that contain non-standard (and non-English) characters (e.g. µ), and need some help in understanding how the XSLT document() function interprets non-standard (and non-English) characters (e.g. µ). The problem is that I can't load files with such names. The xslt is saved and declared as UTF-8. E.g. the xml file has an µ in its name.
0
9728
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9605
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10648
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10402
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10135
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9205
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6890
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5554
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3867
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.