log in / join
Docs & Faqs - Syntax Highlighter

XML code customization

Our highlighters perform a detailed lexical analysis on the source code, based on commonly used browsers and attach different style classes to different language items. Attached CSS classes give you the ability to customize the appearance of the highlighted code as flexibly as possible.

In the followings, you can find descriptions about the attached classes and their default color settings. The default settings for these classes can be found in the dottoro-highlighter-v4.css file.

General language items:

Sample code:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" >
<root>
     <!-- This is a comment -->

     <![CDATA[ 
         This is a CDATA section
     ]]>

     <item>Plain text content</item>
     <item %invalidAttribute="false" color=invalidValue />
</root>

Classes:

Class name Default color Description Applies to
xml_def
default plain texts and whitespaces
xml_com
comment comments
xml_cdata
CDATA CDATA sections
xml_invalid
invalid character sequence invalid character sequences
xml_dectag
declaration tag declaration tags
xml_doctype
doctype !DOCTYPE elements

Tags, attributes and attribute values:

Sample code:

<root>
    <item color="red" />
    <item color="green" />
    <item color="blue" />
</root>

Classes:

Class name Default color Description Applies to
xml_tagop
tag operator tag operators: < and >
xml_attrop
attribute value assign operator attribute value assign operators (= signs)
xml_tag
tag elements
xml_attr
attribute attributes
xml_attrvalue
attribute value attribute values

More On Customization

Introduction
Customization
Themes
Plugins
Service Keys
News
Faq
Reported Bugs