naxsupermarket.blogg.se

Xml escape characters
Xml escape characters










When the XML document is parsed ( Character references are not expanded), so any chars within a CDATA block are just seen as character data.Īs no escaping is possible within CDATA it is not possible to escape the terminating ]]> therefore not possible to nest CDATA blocks.

xml escape characters

The ' and " chars don't need escaping within an elementĭata within a CDATA block can not be escaped. However, it is good practice to escape > chars It is good practice to escape > characters.Ī') are optional, but its good practice to always escape them. The & must always be escaped within attribute data. Typically all the data would be escaped though. However there is no harm in always escaping them.ĪttributeName="She said 'You're right'"ĪttributeName='She said "You're right"'ĪttributeName="She said 'You're right'"

xml escape characters

The double quotes do not need escaping as they are contained within a single quoted attribute. The double quotes in the data must be escaped. The greater than and less than characters do no have to be escaped but its good practice to do it. The ampersand & character must be escaped. When attribute data is enclosed in single quotes ' then any single quote ' characters within the data must be escaped. When attribute data is enclosed in double quotes " then any double quote " characters within the data must be escaped. Element and Attribute names can NOT contain characters "'& escaped or otherwise












Xml escape characters