Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>CDATA SQL HighlighterNew to Visual Studio Code? Get it now.
CDATA SQL Highlighter

CDATA SQL Highlighter

MarcinKotynia

|
213 installs
| (1) | Free
Syntax Highlighting for embedded SQL inside CDATA tags.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

CDATA-SQL-HIGHLIGHTER

This extension provides syntax highlighting for content embedded within CDATA sections in XML files. It detects whether a CDATA block holds SQL, Markdown or a URL and highlights it accordingly.

Features

  • Syntax highlighting for SQL code within CDATA tags in XML files.
  • Dedicated highlighting for SQL keywords, functions, and operators.
  • Markdown highlighting for documentation blocks (e.g. <description>).
  • URL highlighting with [[param]] and {param} placeholders marked as variables.
  • The closing ]]> is always recognized, even after unclosed brackets, strings or comments.

Content detection

The type of a CDATA block is decided by its first non-blank character (it may be on the line after <![CDATA[). The first matching rule wins:

Starts with Highlighted as Example
# Markdown <description><![CDATA[ followed by ## Opis
/ (but not /*) URL <![CDATA[/srs/007-firm/view?firmid={firmid}&datefrom=[[datefrom]]]]>
anything else SQL <![CDATA[SELECT ..., <![CDATA[/* comment */ ..., <![CDATA[IF OBJECT_ID(...)

Highlighting works line by line, so the type is chosen from the start of the block; SQL is the fallback for everything that is not Markdown or a URL.

Screenshots

before:

before

after:

after

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft