473,402 Members | 2,061 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,402 software developers and data experts.

Escaping XML markup

1
I am unable to do string manipulation on xmldatadocument.


SqlConnect Sqlconn = new SqlConnect();
DataSet ds = Sqlconn.ReturnDataSet(SqlConnStr, table1, table2);
DataSet ds1 = Sqlconn.ReturnDataSet(SqlConnStr, table1, table2);


XmlDataDocument inputDoc = new XmlDataDocument(ds);
XmlDataDocument inputDoc1 = new XmlDataDocument(inputDoc);


string result = inputDoc1.ToString().Replace("&lt;", "<").Replace("&gt;", ">");


XslCompiledTransform xsltProcessor = new XslCompiledTransform();
xsltProcessor.Load("StyleSheet.xsl");
StringWriter stringWriter = new StringWriter();
xsltProcessor.Transform(result, null, stringWriter);

//string result = stringWriter.ToString().Replace("&lt;", "<").Replace("&gt;", ">").Replace("\"", "&quot;");
content.InnerHtml = stringWriter.ToString();
Sep 19 '07 #1
0 694

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Dave Moore | last post by:
Hi All, Can anybody point me to a FAQ or similar that describes what all this stuff is about please?. I'm interfacing with a MySQL database if that's relavent. I've read a couple of books which...
5
by: bobbyballgame | last post by:
I am having a problem calling Stored Procedures: .... dim MyValue, MyOtherValue MyValue = "Bobby's value" MyOtherValue = Bobby's other value" rs.Open "exec MyStoredProc """ & MyValue &...
1
by: Lisa | last post by:
I need to apply the HTML formatting tags and the French accented characters in a XML document. The XML is generated from a database that has HTML tags and French accented characters in the records....
1
by: Ted Weatherly | last post by:
Hello, I want to dynamically create a table cell with a textfield in it. The value for the textfield can have quotes. e.g. I have this snippet of javascript code: var td =...
7
by: duwayne | last post by:
I have a problem of escaping quotes in javascript. Ex: onclick='alert( "Mister O'Hara" )' onclick='alert( "Mister O\'Hara" )' both gives me an error. How would I escape this?
11
by: gisleyt | last post by:
I need to escape e.g. & within an attribute, as in: <foo bar="+$"/> Since this is a regular expression and will not be validated as a normal xml file, i cannot use &amp; for &. CDATA does not seem...
3
by: Arthur Dent | last post by:
Hello All... I am in an app that needs to write out an XML document for transmittal to an outside organization. All good and fine... I create the XmlDocument object, append all my nodes, and...
3
by: Taras_96 | last post by:
Hi everyone, I'm having a bit of trouble understanding the purpose of escaping nulls, and the use of addcslashes. Firstly, the manual states that: "Strictly speaking, MySQL requires only...
1
by: David Henderson | last post by:
I know 'disable-output-escaping' has been discussed in the past, but I can't put my finger on any of the threads to see if my current problem is addressed. Sorry for re-asking the question if it...
1
by: mister-Ed | last post by:
I have a datagrid, and when initializing my field variables, I need to double up apostrophes so they are accepted into SQL dbase. In the line below, i'm trying to do this with the Replace function,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
0
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...
0
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,...

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.