473,386 Members | 1,791 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

When writing XmlDocument to HttpResponse.Output the & goes to &


I'm creating an XmlDocument manually, adding content using the Xml classes
such as XmlElement and XmlText, and I then write it out as as "text/xml" to
the HttpResponse.Output TextWriter object under IIS.

The problem I get is when I create an XmlElement with an XmlAttribute whose
value contains the "&" character. When the xml is written the "&" has
become "&amp". This happens when I use XmlDocument.InnerXML or
XmlDocument.WriteTo(XmlWriter).

It seems the & is being URL encoded twice... I would like it not to be
encoded at all. So first I need to know where it is being encoded, then I
need to know how to disable/bypass the encoding. It would also be nice to
know why it is being encoded...

Any help is appreciated.

James.
Jul 21 '05 #1
0 1619

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

Similar topics

1
by: AJ Brown | last post by:
I'm loading an XmlDocument object from a string using LoadXml. The string is a well-formed XML fragment (see example) and loads fine, however there are entities (&) within attribute values. The...
5
by: martin | last post by:
Hi, I would be extremly grateful for some help on producing an xml fragemt. The fragment that I wish to produce should look like this <Addresses> <Address>&qout;Somebody's Name&quot;...
0
by: James Thurley | last post by:
I'm creating an XmlDocument manually, adding content using the Xml classes such as XmlElement and XmlText, and I then write it out as as "text/xml" to the HttpResponse.Output TextWriter object...
2
by: Jim Carlock | last post by:
http:/ / aquaticcreationsnc . com/lib/php/test.php Remove the spaces to visit the link above... The w3 validator identifies the ampersand character as the leading character for special...
4
by: SteveT | last post by:
I am trying to create a dataset from an XML file. When calling myDataSet.ReadXml("sample.xml") the code produces an exception error. The XML file has many strings that identify pnp ids on a...
0
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted...
1
chantymalo
by: chantymalo | last post by:
This is something that has me very confused. I'm trying to write a string including the & symbol, but I cant do it!!!! if I write something like: Dim str as String str "Pete&Jack" it...
5
by: MikeB | last post by:
Hello All, I need to post / redirect to a 3rd party URL with the form variables dynamically created. Can anyone give me any pointers? TIA
2
by: tim007 | last post by:
Hi All, I wanted to know why and when , should we use NHibernate as a data access layer in a C#.Net Project. Can we opt Nhibernate for its ease of implimentation ? or will it increase...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.