Hi i have applied CDATA to a sectio of nodes in a xml all the < and > are replaced by < and >. I want to replace " with " in addition.
what changes do i need to make to the CDATA part to replace " with "
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You don’t say clearly what you are doing, so it’s hard to answer simply.
If what you mean is that
ltandgtwhere the input has angle brackets (so<p class="greeting">Hello, world</p>becomes<p class="greeting">Hello, world!</p>, and this is what you desire; andquotthen one way to achieve your aim is to write a template to handle text nodes, which tests for the presence of “, splits the text node into left-part and right-part on the first “, writes out the left part, writes out an ampersand, writes out
quot;, and then calls itself recursively with the right part of the string.The following stylesheet illustrates the pattern:
We can apply it to the following input to see the result:
The result I get is, I conjecture, what you are looking for.
If that wasn’t what you wanted, you might try explaining your question in more detail. It’s always a good idea in cases like this to provide (a) the key bits of your current code, (b) sample input, (c) a sample of the output you’re currently getting, with a description of what’s wrong with it, and (d) a sample of what you would like the output to look like. (Keep both the samples and the code short — you want to provide the smallest possible complete working example so readers can recreate your problem.)