- Index

< Previous |  | Next >

# Text-Based XML Configuration File Editor

The text-based XML configuration file editor is a validating XML editor that is aware of the schema that defines the XML syntax of LiveView configuration files.

To access the text-based XML Configuration File Editor, right-click the lvconf file and select Open With → LiveView Configuration XML Editor.

## XML Editor Features

Take advantage of the following features while editing your lvconf files:

Typechecking Support

  The XML editor typechecks your configuration file as you compose or edit it, and places a red location marker in the right margin to locate errors. Hover the mouse over the red square marker at the top of the right margin to see a count of the errors in the current file. Hover the mouse over red rectangles in the right margin to see a report of the error at that line.

  When you request validation of the current file, the Editor places a red X () marker on the left margin next to lines that fail to pass validation. See XML Editor Validation below.

Namespace Aware

  The XML editor is aware of XML namespaces. When you create a new, blank configuration file, Studio places two namespace declarations placed in the top-level `<liveview-configuration>` element. These declarations are what direct the XML editor to Studio's internal copy of the lvconf file schema. Do not edit or remove the namespace declarations, or Studio may not be able to provide schema-aware assistance while editing.

Source View

  By default, Studio opens deployment files in the Source tab of the XML editor, which shows the XML text of the file.

Design View

  You may prefer to use the Design view of the XML editor, which shows the XML in a tree view. Content assistance, typechecking, and the other features of the XML editor are available. To enter Design view, select the Design tab at the bottom left of the XML editor view; select Source to return to the default Source view.

  ### Note

  The Design view is accessible by opening the lvconf file with any of the text-based XML configuration file editors. It is not available from the forms-based LiveView Configuration File Editor.

Syntax Color Coding

  In Source view, the XML editor provides syntax color coding of the XML text.

Autocompletion

  When typing a new element or attribute name, press Ctrl+Space after the first few letters. The XML editor shows its content assistance window with one or more candidates to complete the element. If there is one candidate, then press Enter to complete the element. Notice that the XML editor inserts a closing tag for the element as well.

Syntax Help Text in Content Assistance

  Notice the yellow pane of the content assistance pop-up in the image above. The XML editor provides help text for the currently selected element in the white context assistance pane.

Tag Proposal of Elements

  Type an opening angle bracket, then Ctrl+Space. The XML editor's content assistance window shows you all elements that can be entered in the current location.

Required Attributes Included

  When you add an element, its required attributes are included.

Tag Proposal of Attributes

  Place the cursor after an element name but before its closing angle bracket, then press Ctrl+Space. The XML editor proposes all optional attributes that are valid for the current element and location.

## XML Editor Validation

The text-based XML configuration file XML editor validates when you right-click in the left margin and select Validate. The editor places red markers in the right margin to direct you to the location of errors:

Red square marker

  Hover the mouse over the red square marker at the top of the right margin to see a count of the errors in the current file.

Red rectangle marker

  Hover the mouse over red rectangles in the right margin to see a report of the error at that line. In this example, the value of the `id` attribute is missing its closing quote:

To force validation against the schema of each lvconf file individually, select the file in the Package Explorer view, right-click, and select Validate from the context menu. This places red X () markers in the left margin and on the file's entry in the Package Explorer view. These errors also show in Studio's Problems view.

To force validation of the full set of lvconf files in the current Studio project, select the project's name in the Package Explorer view, right-click, and select Validate from the context menu.