How to safely escape invalid XML characters
9/25/2008
| Author: Brian Pautsch
| Category: Code Snippets
| 4002 Views
|
When saving strings to XML, it important to escape invalid characters. The following table shows the invalid XML characters and their escaped equivalents.
Invalid XML Character
Replaced With
<
...
How to validate strings for XML
9/2/2008
| Author: Brian Pautsch
| Category: Code Snippets
| 1755 Views
|
Back on 3/28/2008, we published a blog titled How to check for hexidecimal characters. I used this code as a basis to write a method to ensure only valid UTF-8 characters are in a string. If invalid characters are in an ...