문제

I wish to have an attribute in xml language, which content shouldn't be parsed. It may contain javascript code, which probably contains many '&,|' and other operator types. Im aware that the Text node can be a CDATA value, but how can I do the same behavior for attributes?

도움이 되었습니까?

해결책

You can't.

If you want to use characters with special meaning in an XML attribute value then you must use character references for those characters.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top