473,796 Members | 2,583 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Special Characters(&,et c..) in a string between xml tags

NAT
I have a xml open and close tag <abc</abc>. I assign a string variable to
this tag. <abc& NAT & </abc. The value of the variable NAT = Cal&FLo. But
due to the presence of the ampersand. There is an exception. What do I need
to do to display & nd other special chracters correctly in xml tags.
Jul 26 '06 #1
2 1784
"NAT" <NA*@discussion s.microsoft.com schrieb:
>I have a xml open and close tag <abc</abc>. I assign a string variable to
this tag. <abc& NAT & </abc. The value of the variable NAT = Cal&FLo.
But
due to the presence of the ampersand. There is an exception. What do I
need
to do to display & nd other special chracters correctly in xml tags.
"&" -"&amp;".

<URL:http://groups.google.d e/group/microsoft.publi c.de.german.ent wickler.dotnet. vb/browse_frm/thread/43752abd5ca5b1d e/aa4cfc5ab26203d 8>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Jul 26 '06 #2

"NAT" <NA*@discussion s.microsoft.com wrote in message
news:47******** *************** ***********@mic rosoft.com...
I have a xml open and close tag <abc</abc>. I assign a string variable
to
this tag. <abc& NAT & </abc. The value of the variable NAT = Cal&FLo.
But
due to the presence of the ampersand. There is an exception. What do I
need
to do to display & nd other special chracters correctly in xml tags.
See if this helps...

http://www.w3.org/TR/xhtml1/

See: Section C.12 - Using Ampersands in Attribute Values (and Elsewhere)

....or, for the impatient, try using &amp; instead of the ampersand
character.
Jul 26 '06 #3

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

Similar topics

4
1958
by: Reply-Via-Newsgroup | last post by:
Folks, I have the following string: 1P,2G,3G,3ML,4L,5LB,4P Anybody know how I can easily seperate the letters and numbers in to multi-dimension array so as I have something like $myarray="1";
1
5460
by: RJN | last post by:
Hi I'm using XMLTextReader to parse the contents of XML. I have issues when the xml content itself has some special characters like & ,> etc. <CompanyName>Johnson & Jhonson</CompanyName> <EmployeeStrength>> 1000</EmployeeStrength> When I do a Xmltextreader.read() and then check the contents of the xml node by XmltextReader.ReadString(), I get an exception when I have
0
1122
by: Fuochi | last post by:
hello, I have Visual Studio .Net 2002 C++. I have migrated a code created under VS 6.0 that contains a call to the method CreateField. This method fail in release mode if the string parameter contains exactly 8 characters, but not in debug mode. does anyone know if it exists a patch for VS .Net IDE
2
1167
by: Lloyd Dupont | last post by:
what means <%= something %> and <%# something %>
0
977
by: tatemononai | last post by:
I have an asp.net application that mixes English and Japanese. I can put Japanese and English characters directly on an .aspx page and it works without any problem at all. However, when I try to put Japanese characters inside a Web User Control which is loaded on the .aspx page, it comes back as nothing but garbage. I can enter the characters on to the page in Visual Studio without any problems, but when I run the app it shows up as...
2
2027
by: tatemononai | last post by:
I'm trying to display Japanese characters on an asp.net web forms application. I am about ready to shave my head too. The whole thing is just silly. Ok, inside Visual Studio I can enter Japanese into my code left and right and it works without any problems. When I dubug the application any Japanese characters on the page turn into garbage. If I have characters directly on the page, garbage. If I have characters inside a text label,...
6
1666
by: gonzlobo | last post by:
I've been using Python for a few days. It's such the perfect language for parsing data! I really like it so far, but I'm having a hard time reading a file, reading the first few hex characters & converting them to an integer. Once the characters are converted to an integer, I'd like to write the data to another file. Here's the code snipped to the bare minimum: ---
2
2016
by: lonni4000 | last post by:
My parser parses special characters okay, but adds extra line breaks. It makes no sense to me at all! If anyone knows what I am doing wrong, please help. text file: <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE Feed SYSTEM "SDF_NA4.dtd"> <Feed> ..... <OfficialName>Great Big &amp; Little Co.</OfficialName>
3
1589
by: khaledcoco | last post by:
how to define a function to do the following: if I press shift+H, show another letter like shift+h -> Y
0
9680
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
9528
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
10455
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...
0
10006
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...
1
7547
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6788
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
5441
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...
0
5573
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2925
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.