My Assistant
![]() ![]() |
|
|
Dec 5 2007, 03:36 PM
Post
#1
|
|
|
UtterAccess Member Posts: 32 From: NE |
I'm dumping a recordset out into XML and would like to know if anyone knows of a way to change the ampersands to & and the apostrophes to &apos as its building the XML. I am doing this in ASP not right in access.
Darren Edited by: akhound on Wed Dec 5 15:38:07 EST 2007. |
|
|
|
Dec 5 2007, 03:39 PM
Post
#2
|
|
|
UtterAccess VIP Posts: 18,396 From: Oklahoma City, Oklahoma |
Darren
I would probably use the Replace() function to format the data before exporting. CODE Replace( Replace([field],"&","&") , "'","&apos")
See: http://www.w3schools.com/vbscript/func_replace.asp Iy you have more to do them use a function, something like: CODE FUNCTION PreSubmit(p_sTargetString)
PreSubmit = REPLACE(p_sTargetString,”textarea”,”") PreSubmit = REPLACE(PreSubmit,"'","&apos") PreSubmit = REPLACE(PreSubmit,"&","&") PreSubmit = Trim(PreSubmit) END FUNCTION Edited by: HiTechCoach on Wed Dec 5 15:49:41 EST 2007. |
|
|
|
Dec 5 2007, 03:42 PM
Post
#3
|
|
|
UtterAccess Addict Posts: 152 From: Omaha, NE |
I believe you can also use an escape() function to convert all bothersome characters to safe alternatives. (And use and unescape() to put it back)
|
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 25th May 2013 - 02:50 AM |