Using Reserved Characters (<, >, &, ', and ") Inside Elements
InstallShield 2020
Project:This information applies to the following project types:
• | Basic MSI |
• | DIM |
• | InstallScript |
• | InstallScript MSI |
• | Merge Module |
• | MSI Database |
• | Transform |
If you use a reserved character such as a less than symbol (<) inside an XML element, the MSXML parser converts it at run time on target systems to its predefined entity (<). Using the less than symbol instead of its entity would generate an error because XML parsers would interpret it as the start of a new element, and it would result in invalid XML code. Note that if you open the resulting XML file in a browser such as Internet Explorer, the character—not its entity—is displayed inside the XML element.
The following table lists the reserved XML characters and their entity equivalents. The table also indicates whether each reserved character is replaced by its entity at run time.
Character |
Entity |
Description |
Notes |
< |
< |
Less than |
This character cannot be used as content in an XML element because it is reserved to be used to indicate the start of an XML element. This character is automatically replaced by its entity at run time. |
> |
> |
Greater than |
This character is automatically replaced by its entity at run time. |
& |
& |
And |
This character cannot be used as content in an XML element unless it indicates the start of an entity. If this character is used as content in an XML element but it does not indicate the start of an entity, it is automatically replaced by its entity at run time. |
’ |
' |
Apostrophe |
This character is not automatically replaced by its entity at run time. |
" |
" |
Quotation mark |
This character is not automatically replaced by its entity at run time. |
See Also