XL2002: Some Characters Cause a Smart Tag List to Fail (295008)



The information in this article applies to:

  • Microsoft Excel 2002

This article was previously published under Q295008

SYMPTOMS

When you install a Smart Tag List and then start Microsoft Excel, the Smart Tag List fails to load.

-or-

In Microsoft Internet Explorer, when you open the Extensible Markup Language (XML) file created for a Smart Tag List, you receive an error message similar to the following:
The XML page cannot be displayed

Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.

A semi colon character was expected.

CAUSE

The ampersand (&), quotation mark ("), apostrophe ('), and element delimeters (<) and (>), are not allowed within parsed character data, such as a Uniform Resource Locator (URL).

WORKAROUND

To work around the issue, use either of the following methods.

Method 1: Use Entity References

Use entity references instead of the actual characters:
  • Instead of &, use &amp;
  • Instead of ", use &quot;
  • Instead of ', use &apos;
  • Instead of <, use <
  • Instead of >, use >
For example, in the following URL
<FL:url>http://search.microsoft.com/us/SearchMS25.asp?so=RECCNT&qu={TEXT}</FL:url> 
				
you can replace the ampersand with &amp; as below:
<FL:url>http://search.microsoft.com/us/SearchMS25.asp?so=RECCNT&amp;qu={TEXT}</FL:url>
				

Method 2: Use the CDATA Construct

Use the CDATA construct, which treats the entire string as plain text, for example:

http://search.microsoft.com/us/SearchMS25.asp?so=RECCNT&amp;qu={TEXT}

REFERENCES

For additional information about Smart Tag Lists, click the article number below to view the article in the Microsoft Knowledge Base:

287698 OFFXP: How to Create a Microsoft Office Smart Tag List

For more information about XML, entity references, and the CDATA construct, see the XML Developer's Guide at the Microsoft Developer Network Library.

Modification Type:MajorLast Reviewed:5/21/2001
Keywords:kberrmsg kbprb KB295008