11 out of 13 rated this helpful - Rate this topic

XML Reserved Characters

SQL Server 2005

In XML, some characters are reserved for internal use and you must replace them by entity references when they are used in data.

The following table shows the characters that must be replaced by their entity references in all application definition files (ADFs) and instance configuration files (ICFs).

Character Meaning Entity reference

>

Greater than

>

<

Less than

&lt;

&

Ampersand

&amp;

%

Percent

&#37;

The Notification Services XML vocabulary reserves the percent sign (%) for denoting parameters.

The following example shows the use of an entity reference in place of a less-than symbol (<) in an Action element from an ADF:

<Action>
    INSERT INTO FlightNotifications(SubscriberId, DeviceName, 
        SubscriberLocale, Carrier, LeavingFrom, GoingTo, 
        Price, Conditions)
    SELECT S.SubscriberId, S.DeviceName, S.SubscriberLocale, 
        E.Carrier, E.LeavingFrom, E.GoingTo, E.Price, 
        E.Conditions
    FROM FlightEvents E, FlightSubscriptions S
    WHERE E.LeavingFrom = S.LeavingFrom
    AND E.GoingTo = S.GoingTo
    AND ( (E.Carrier = S.Airline) OR (S.Airline = '*') )
    AND E.Price &lt; S.Price
</Action>
Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.