The XML editor is a tool for creating and viewing XML files
You can use it to perform a variety of tasks such as:
- Creating new, empty XML files or generating them from existing DTDs or
existing XML schemas
- Editing XML files
- Importing existing XML files for structured viewing
- Associating XML files with DTDs or XML schemas
The XML editor has two main views - the Source view and the Design view.
You can also use the Outline view to insert and delete elements.
Source view
The Source view enables you to view
and work directly with a file's source code.
The Source view has many text editing features,
such as:
- Syntax highlighting, unlimited undo/redo, and user-defined templates.
- Content assist, which uses the information in a DTD or schema content
model to provide a list of acceptable continuations depending on where the
cursor is located in an XML file, or what has just been type
- "Smart" double-clicking behavior. If your cursor is placed in an attribute
value, one double-click selects that value, another double click selects the
attribute-value pair, and a third double-click selects the entire tag. This
makes it easier to copy and paste commonly used pieces of XML.
Design view
The XML editor also has a Design view.
In it:
- The XML file is represented simultaneously as a table and a tree. This
helps make navigation and editing easier.
- Content and attribute values can be edited directly in the table cells,
while pop-up menus on the tree nodes give alternatives that are valid for
that location. For example, the Add child menu item
will list only those elements from a DTD or XML schema which would be valid
children at that point (as long as grammar constraints are on).
The Design view is especially helpful if you are
new to XML, or need to do form-oriented editing. For example, you could use
the Create XML File wizard to create a template XML file for a job description
form from a job description DTD. After those steps are completed, you
would only have to fill in the form data using the Design view.
The
following links provide more information about the XML editor: