Developers Program

How to post special characters to Title or Description field in AddItem call

Published: November 01 2007, 4:39:00 PM·Updated: September 02 2022, 11:48:58 AM

Products

Question

Depending on your environment, to post special characters to the Title or Description fields when using AddItem / ReviseItem either use XML entities or wrap the field in a CDATA container.

Answer

Detailed Description

Assume you have the following text to insert into a Title field with an AddItem call :

Rohde & Schwarz® Spectrum Analyzer

Depending on the programming environment you're working in, you can get the special characters to show up in the final View Item page by one of two methods :

1. Use XML entity encoding for the special characters

    <Title>Rohde &amp; Schwarz&#174; Spectrum Analyzer"</Title>
2. Wrap the characters as-is in a CDATA container :

    <Title><![CDATA[Rohde & Schwarz® Spectrum Analyzer]]></Title>
How well did this answer your question?