CDATA в xml>> Attribute values require quotation marks. >> Values for attributes must be in single or double quotation marks. For example, without XML validation, you can specify language=JScript in a <script> element. But to follow XML rules, the same attribute would be language="JScript". >> >> Reserved characters in script elements must be made opaque. >> Script elements frequently include greater than (<) and less than (>) symbols, the ampersand symbol (&), and other characters that are reserved in XML. If you are creating a closely conformant XML file, you must make sure that these reserved characters do not confuse the XML parser. You can individually mark characters with escape sequences (for example, specify "<" as "<"), or you can make an entire script element opaque by enclosing it in a <![CDATA[ ...]]> section. Without XML validation, the script component XML parser treats <script> elements as opaque by default. >
предыдущий был я . не читайте... тут у меня все lt и gt заменились...... sorry еще раз. Да это все понятно. Читал спецификации... Я вот о чем. пишу что-нить типа (например): <script language="JavaScript"> <![CDATA[ var str = '<br>'; ]]> </script> получаю : <script language="JavaScript"> var str = '<br>'; </script> тут все нормально... а вот если пишу <![CDATA[ <script language="JavaScript"> var str = '<br>'; </script> ]]> то получаю &lt;script language="JavaScript"&gt; var str = '&lt;br&gt'; &lt;/script&gt; почему он мне тут похерил < и > внутри CDATA, а в предыдущем примере - нет ? |