Home >
Online Product Documentation >
Table of Contents >
XML Editor Tree Tab
XML Editor Tree Tab
To display the XML editor, open an XML document, or select
File >
New >
XML Document from the Stylus Studio menu bar. At the bottom of the XML editor window, click the
Tree tab.
The
Tree tab of the XML editor displays a collapsible and expandable DOM tree representation of your XML document. In this view, you can add any kind of node and specify values for nodes.
To expand a tree so that you can see all the nodes in the tree, click the root node and then press the asterisk (
*) key in the numeric key pad. To expand any particular node, click that node and press
* in the numeric key pad.
Fields
Query
Type a query that you want to run on this XML document. Click
Refresh Query
to run the query. Stylus Studio displays the results of the query in the
Query Output pane. Click the down arrow to select a previously defined query or define a new query.
Buttons for Editing
The buttons along the top of the
Tree tab allow you to edit the tree. Hover help is available to determine what each button does.
If hover help is not enabled, you can turn it on as follows:
1. Select
Tools >
Customize.
2. Click
Show Tooltips and click
OK.
The buttons are as follows:
Refresh refreshes the screen display.
Delete Node deletes the selected node.
Change Name allows you to change the name of the selected node.
Change Value allows you to change the value of the selected node.
Move Up moves the selected node to be before its preceding sibling.
Move Down moves the selected node to be after its following sibling.
Toggle Display of White Space toggles the display of white space in the tree.
Toggle Display of Entity References toggles the display of entity references in the tree. Stylus Studio displays either the entity symbols or the entity values.
Validate Document analyzes the document against its DTD. If the document does not have an associated DTD, you receive a message that informs you of this. However, Stylus Studio tries to validate only well-formed documents. Consequently, you can use
Validate Document to determine whether your document is well-formed. If it is not, Stylus Studio displays a messages that provides information about the location and nature of the errors.
Change Font allows you to choose the display font.
Open Schema opens the schema, if there is one, for the XML document.
Refresh Query executes the selected query.
Buttons for Adding Nodes
The buttons along the left side of the
Tree tab allow you to add the various types of nodes. Move the cursor over each button to determine which type of node it adds.
To add a node, select a node that is already in the DOM tree, and then click the button for the type of node you want to add. Stylus Studio adds the new node relative to the node you selected.
New Element adds a new element node. Specify the name, and the value if you want.
New Attribute add a new attribute node. Specify the name, and the value if you want.
New Text adds a new text node. Enter the data you want the text node to contain.
New CDATA adds a new
CDATA node. Enter the data you want the CDATA node to contain.
New Comment adds a new
comment node. Enter the comment.
New Processing Instruction adds a new processing instruction. Specify a name for the processing instruction, and then specify the instruction.
New Entity Reference adds a new reference to an entity defined in the schema for this document.
For More Information
Updating DOM Tree Structures