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

Backslash "\" is being added to XML Attributes, Is there a way to get rid off it?

I am loading an Xml from a physical file and passing it to XSL transformation. When i load the file (C# code), InnerXML shows backslash before all the XML attributes. Xsl transformation crashes because of it.

However the physical file (xml) has no backslash before the attributes.

Here is the code:

string strinputfile=System.Configuration.ConfigurationSet tings.AppSettings["InputURL"];

doc.Load(strinputfile);

doc.InnerXML shows backslashes before attributes..

How do i get rid off this? Any help is greatly appreciated.
Jun 14 '07 #1
2 2056
naivE
12
Is it just showing the extra \ in the debugger or is it actually outputting these extra slashes?
If it is the former then there is nothing to worry about and it is just putting them in so that the compiler doesn't look at the escape characters in XML.
An easy way to check would be displaying the return in the command line.

Hope this is some help.
Jun 15 '07 #2
I see the backslash in the debugger(visual studio 2003). i am 99% sure it is a escape character. But i don't understand why XSLT don't ignore this escape character? Is there a way to make xslt ignore special character?

When i save the debugger output to a notepad, remove the backslash and pass it to xslt using stylus studio, it runs fine.

Example:

<PersDriver id=\"Driver-01\">.. XSLT is not liking '\'

=============================================

Is it just showing the extra \ in the debugger or is it actually outputting these extra slashes?
If it is the former then there is nothing to worry about and it is just putting them in so that the compiler doesn't look at the escape characters in XML.
An easy way to check would be displaying the return in the command line.

Hope this is some help.
Jun 15 '07 #3

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

Similar topics

5
by: Paul Miller | last post by:
We've run into minidom's inabilty to handle large (20+MB) XML files, and need a replacement that can handle it. Unfortunately, we're pretty dependent on a DOM, so a pulldom or SAX replacement is...
0
by: Anthony Baxter | last post by:
To go along with the 2.4a3 release, here's an updated version of the decorator PEP. It describes the state of decorators as they are in 2.4a3. PEP: 318 Title: Decorators for Functions and...
8
by: Lian | last post by:
Hi all, It is a newbie's question about html tag "img". The attributes "title" and "alt" for "img" seems having the same function. So what is the main difference between them? Can i use them at...
134
by: James A. Donald | last post by:
I am contemplating getting into Python, which is used by engineers I admire - google and Bram Cohen, but was horrified to read "no variable or argument declarations are necessary." Surely that...
8
by: Pete | last post by:
I have not encountering this problem 'till I got VS.NET 2003. Check my xml below how the backlash is added. I tried all possible ways to replace it but nothing happens. Any help will greatly...
2
by: Johann Blake | last post by:
I posted a related problem today. The problem is this: string str1 = @""""; When I execute this code (even in a bare bones application), in the IDE it returns "\""" Why? Even in the...
19
by: Alan J. Flavell | last post by:
The story so far: on somewhat unrelated newsgroup, my attention fell upon the URL: http://www.speedtouchdsl.com/prod706.htm which contains a link to the purported URL:...
2
by: JPS | last post by:
I need to build a string with just one backslash included "\", but I keep getting an error message unless I use "\\". The double backslashes will not work with what I am doing.
45
by: Umesh | last post by:
please help. thanks.
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.