XML Encoding

Background

Earlier today I found myself looking at some scripts.

As I dug in more was a bit surprised at which characters actually changed when XML Encoded.

 

Table

Ascii Character Char Symbol XML
38 Ampersand & &
60 Less Than < &lt;
62 Greater Than > &gt;

Summary

Using Microsoft Technologies, SQL Server and PowerShell, these three characters ( &, <, and >) are the only ASCII characters that return a different value when XML Encoded.

A couple of online tools indicate that single quotes (‘) and double quotes (“) also return different values when XML Encoded.

 

Your Exercise

As always, prepare a cup of coffee, and take it to the lab.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s