Forum Moderators: open
You'll have to forgive my ignorance. I am new new new to xml and only have a few months experience in ADO and ASP. I wish to create a dynamically dirven XML document - which seems to work fine except for the f#@%@$#$% ampersand character.
Is it possible to conduct a search and replace on the entire recordset once I open it. (vbscript)
Any help would be muchly appreciated
Thanks,
James
Obvious solutions;
1) Assuming you are pulling data from a SQL capable db, use a query to extract the data, include a REPLACE function on each field you want returned.
*or*
2) Create a simple wrapper function to be used in between getting the data from the db and actually storing / writing it.
*or*
3) Use something which can pull data from the native format into plain XML on your behalf, hopefully this should be smart enough to translate problem characters for you.
Also have you considered that if you are writing out not just elements but attributes then a rogue quote inside attribute text could also break your XML, this is why I favour 2) when 1) isn't available.
- Tony