Click here to Skip to main content
15,886,518 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
HTML
<root xmlns="http://tempuri.org/">
<value PID="AN_PW_ID_2" NAME="Name1" PHONENO="1234567890" ADDRESS="sun" />
<value PID="AN_PW_ID_2" NAME="Name2" PHONENO="0123456789" ADDRESS="moon" />
</root>

how to remove the content(xmlns="http://tempuri.org/") from the above using sql in sqlserver 2005...
Posted
Updated 12-Jan-12 22:27pm
v2

you can use SQL REPLACE function

Example
SQL
SELECT REPLACE('"<root xmlns="http://tempuri.org/"><value pid="AN_PW_ID_2" name="Name1" phoneno="1234567890" address="sun" /><value pid="AN_PW_ID_2" name="Name2" phoneno="0123456789" address="moon" /></root>"','xmlns="http://tempuri.org/"','');
 
Share this answer
 
u have replaced the input tags which i passed....but in my case , the value tags can be many number....so i cant write all those tags to replace...all i want is just remove xmlns...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900