[RESOLVED] Hypothetical XML question
We know that when assigning values to attributes, we put the values in double quotes. Like this:
<tagname attr="abc">
If there is a double quote in the value, you go:
<tagname attr='ab"c'>
If there is a single quote, it's as the first one:
<tagname attr="ab'c">
Here's the question. What if the value has both single and double quotes?
Re: Hypothetical XML question
Hi,
you'd either use 7 or 8 bit ascii character code references.
Kai :wave:
Re: Hypothetical XML question
Apparently you can use the following codes instead of the quote characters:
" = "
' = '
Re: Hypothetical XML question
Explain?
Are you talking about using " in there? Would that work in an attribute?
Re: Hypothetical XML question
I am indeed talking about using the " in there, such as this:
<tagname attr="ab'c"d"> (= ab'c"d)
I haven't tried it myself, but it makes sense, as HTML supports the same escape method.
Re: Hypothetical XML question
Quote:
Originally Posted by si_the_geek
I am indeed talking about using the " in there, such as this:
<tagname attr="ab'c"d"> (= ab'c"d)
I haven't tried it myself, but it makes sense, as HTML supports the same escape method.
You're riiight. :)
Btw, I posted at the same time as you, so my second question now looks really really stupid. Thanks, si. I can always count on you. :afrog:
Re: [RESOLVED] Hypothetical XML question
Don't use ', it doesn't work in IE.
Re: [RESOLVED] Hypothetical XML question