Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

XML PATH to keep html

Posted on 2012-09-21
3
Medium Priority
?
392 Views
Last Modified: 2012-09-21
Hi,

I use XML PATH to combine text in SQL, it works well.  But in some text, I have symbols, such as <, >.  After using the XML PATH, it turns into &lt; or &gt;.

Is there a way to keep what it was ?  thanks
0
Comment
Question by:mcrmg
  • 2
3 Comments
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 38423486
No, you have to reconvert them because those symbols are also used as tag delimiters in XML.  The basic example from http://www.w3schools.com/xml/default.asp  They are changed into 'entities' so they won't interfere with the XML formatting.

<?xml version="1.0"?>
<note>
    <to>Tove</to>
    <from>Jani</from>
    <heading>Reminder</heading>
    <body>Don't forget me this weekend!</body>
</note>

Open in new window

0
 

Author Comment

by:mcrmg
ID: 38423491
I see, so basically, I have to use replace function? thanks
0
 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 1600 total points
ID: 38423736
Here's the 'Predefined entities in XML' : http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references   Most languages have conversion routines to take care of the problem.  This may help: http://forums.asp.net/t/875969.aspx/1
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?

575 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question