Escaping Characters that cause issues in XML
Hi Anyone,
This question must have been asked before on this forum, but I can't find it.
Is there a function either in the STD or out there somewhere that escapes all those characters that are used as structure identifiers in XML?
e.g.
So given a a string
would return
Yours
Allan
This question must have been asked before on this forum, but I can't find it.
Is there a function either in the STD or out there somewhere that escapes all those characters that are used as structure identifiers in XML?
e.g.
- Code: Select all
< & > ' "
<&>'"
So given a a string
- Code: Select all
Allan's
would return
- Code: Select all
Allan's
Yours
Allan
- Allan
- Posts: 444
- Joined: Sat Oct 01, 2011 7:26 pm
Allen,
Have you tried the XMLENCODE() function?
HTH,
Richard
Have you tried the XMLENCODE() function?
HTH,
Richard
- rtaylor
- Community Advisory Board Member
- Posts: 1619
- Joined: Wed Oct 26, 2011 7:40 pm
Ah Richard,
Works a treat!
That's a new built-in function to me.
Will teach me to read the released version of the ECL ref manual!
Yours
Allan
Works a treat!
That's a new built-in function to me.
Will teach me to read the released version of the ECL ref manual!
Yours
Allan
- Allan
- Posts: 444
- Joined: Sat Oct 01, 2011 7:26 pm
Allan,
Yes, I think it is fairly new -- been in the language now about 10+ years
Richard
Yes, I think it is fairly new -- been in the language now about 10+ years

Richard
- rtaylor
- Community Advisory Board Member
- Posts: 1619
- Joined: Wed Oct 26, 2011 7:40 pm
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest