WELCOME

TO

XML NOTEPAD

Version Beta 1.5

Copyright (C) 1998-1999


Overview of XML Notepad

What is XML Notepad?

XML Notepad is a simple application that assists in the building of rapid prototypes of XML applications. It allows authors to rapidly build and edit small sets of XML data as a test bed during the development of XML-based applications. With XML Notepad, you can create XML document prototypes quickly, easily, and in an iterative fashion, using familiar metaphors.

XML Notepad offers an intuitive and simple user interface that graphically represents the tree structure of XML data. Working with the standard building blocks of XML (Elements, Attributes and Text), authors are able to create reproducible data structures that can be easily filled.


Frequently Asked Questions

Answers to the most frequently asked questions.


Why should I use XML Notepad?

XML Notepad enables you to create data sets quickly and easily. XML-based data is displayed graphically in XML Notepad so you don't have to spend time explaining the structure of your data set. XML Notepad saves you time and effort, allowing you to place a greater emphasis on creating your applications than on typing syntax.


How do I author processing instructions in XML Notepad?

How do I enter Processing Instructions in XML Notepad?

Currently Processing Instructions cannot be entered via XML Notepad. Processing instructions can be added by opening the XML document in an external editor such as Notepad.


Can I use international characters in my data?

You can support international characters in your data by including the following XML declaration in your XML document:

<?xml version="1.0" encoding="windows-1252"?>
Like processing instructions, the XML declaration cannot be entered via XML Notepad and must be added in an external editor such as Notepad.


Can I create a DTD in XML Notepad?

The current version of XML Notepad does not support the creation of DTDs. It does however support the creation of XML Schemas, which are expressed in XML syntax.


Does XML Notepad perform DTD or XML Schema validation?

If you have Microsoft's Internet Explorer 5.0 installed on your computer, you can perform DTD or XML Schema validation on your files.


Does XML Notepad produce documents that are compliant with the XML 1.0 specification?

Yes, all documents authored using XML Notepad are XML 1.0 compliant.


Why do I need IE 4.0 SP1 to use XML Notepad?

Internet Explorer 4.0 Service Pack 1 and higher versions include the Microsoft XML parser that XML Notepad uses for parsing XML documents.


Where can I find more information on XML?

You can find more information on XML at the W3C's site (http://www.w3c.org) and at Microsoft's site (http://msdn.microsoft.com/xml).


Who do I contact for further information/assistance on XML Notepad?

You can find the latest information on XML Notepad at the Microsoft website at http://msdn.microsoft.com/xml You can also email us at the XML Notepad Team.


Object Model Issues

This section describes how XML Notepad's behavior is affected by the version of Microsoft's Internet Explorer that you have installed on your computer.


XML Notepad Options

Select Options from the Tools menu to enable or disable the various XML Notepad options. The following dialog box will appear:

Deselecting the Use IE5 Object Model if Available check box allows you continue to use the IE4 OM even when IE5 is installed. See Using the IE5 DOM and Using the IE4 OM for more information on the different behaviors of these object models. This option is greyed out when running IE4. Note that this option does not convert the open document to a different object model, but applies to documents subsequently created or opened by XML Notepad. To convert a file, close it, select this option and then re-open the file.

The Display Compatibility and Data Loss Warnings on Load option directs XML Notepad to warn you when one of the following data loss scenarios occurs:

  • Loading a document under the IE4 OM, validation is not supported and tag names will be converted to uppercase. Also, processing instructions and entities are not supported in the IE4 OM. The former will be converted to text nodes, and the latter will be dropped. A warning will be displayed when opening a document under IE4.
  • Under IE5, processing instructions except those at the document root are dropped. Documents with processing instructions in the document body will cause a warning to be displayed.
  • Under IE5, entities are automatically expanded by XML Notepad. Documents containing entites will cause a warning to be displayed.

After encountering a data loss warning, you can continue with the XML Notepad session. If the data loss is undesirable, close the document without saving or save under another name to preserve the original file.

Validate Document on Load allows you to enable or disable validation checking when loading a file under the IE5 DOM. When this option is selected, loading an XML document will also attempt to validate against the DTD or XML Schema for the document. When this option is disabled, XML Notepad will still read the DTD or XML Schema but will not report validation errors. Validation is not available when using the IE4 OM.


Using the IE5 DOM

Under the IE5 DOM:

  • Case sensitivity of Element and Attribute tag names are preserved.
  • DTD or XML Schema validation occurs on loading a file when Validate Document on Load is selected in the XML Notepad Options dialog. If the XML file is not valid, an error message will be displayed pointing to the invalid node.
  • Processing Instructions in the document body (not at the document root) are not preserved.
  • All entities are expanded.
  • DTD or XML Schema validation does not occur on "Save". Therefore it is possible enter invalid data in your XML file that will result in your inability to reopen the same file.
  • Non-"well-formed" documents cannot be opened. If you attempt to do so, XML Notepad will inform you where the error is occurring in your document. You can then edit your document using an external editor and reopen in XML Notepad.


Using the IE4 OM

Under the IE4 OM:

  • All Element and Attribute tag names are converted to uppercase on loading a file.
  • When performing a "save", tag names are saved as they are displayed.
  • DTD validation is unavailable under the IE4 OM.
  • Processing Instructions are converted to text nodes.
  • Entities are not supported.


Creating and editing XML documents in XML Notepad

The following topics describe how to create and edit XML documents.


Creating a new XML document

To create a new XML document, select New from the File menu or click on the [image] icon.


Opening an XML document

To open an XML document, select Open from the File menu or click on the [image] icon.

Each method will reveal a dialogue box that allows the user to enter either a local file path or a URL pointing to a file.


Saving an XML document

To save an appended document to its original location, select Save from the File menu or click on the [image] icon.

The same methods can be used to save a new document for the first time.

To save a document to a new location or under a different name, select Save As from the File menu.


Viewing XML Source

Viewing the source code of the XML document

To view the XML source of the document on which you are working, select Source from the View menu.


Searching through an XML document

  1. To begin a search, select Find from the Edit menu or click on the [image] icon.

    The following dialogue box will then appear:

  2. In the Find what text box, enter the text for which you choose to search.
  3. Check one of the choices listed under Search in.
  4. Check Match case to make the search case-sensitive.
  5. Under Direction, indicate whether to search up or down the tree.
  6. Click Find Next to begin search.

Click Cancel to cancel the search and return to XML Notepad.


Replacing Names and Values

Replacing a node

  1. In the Edit menu, click on Replace.
  2. The following dialogue box will appear:

    • In the Find what text box, enter the name of the node for which to search.
    • In the Replace with text box, enter the name of the node which will replace the above node.
    • Check one of the choices listed under Search in.
    • Check Match case to make the search case-sensitive.
    • Under Direction, indicate whether to search up or down the tree.
    • Click Replace to replace next instance of the node.
    • Click Replace All to replace all instances of the node.
    • Click Cancel to cancel the replace and return to XML Notepad.


Replicating a node

The Replicate feature enables you to make multiple copies of subtrees, including all values within those subtrees.

  1. Highlight the node to replicate.
  2. In the Tools menu, click on Replicate.
  3. The following dialogue box will appear:

    • In Number of Copies text box, enter the number of copies to make.
    • Check Copy Entire Subtree to replicate node's structure and that of its descendants.
    • Check Copy Values to replicate node's structure and value.
    • Click OK to replicate the node as desired.
    • Click Cancel to cancel the action and return to XML Notepad.


Duplicating a subtree

The Duplicate Subtree feature enables you to make a single copy of a subtree. This copy will not, however, include the values within the original subtree.

  1. Highlight the node to duplicate.
  2. In the Insert menu, click on Duplicate Subtree or click on the [image] icon.


Dragging and dropping Nodes

To reposition nodes, you can use the drag and drop technique.

  1. Click and hold the mouse on the node to drag and drop. The node should now be highlighted.
  2. Drag the mouse to the node's new location and release the button.


Changing a node's type

  1. Highlight the node to change.
  2. Select Change To from the Tools menu.
  3. Under Change To, select the type to which the node is to change.

Valid node type changes

FROM | TO | EFFECT
child element | attribute on parent | only the icon changes
attribute on parent | child element | only the icon changes
text content | leaf element | the icon changes and the element name becomes blank
text content | attribute | the icon changes and the attribute name becomes blank
leaf element | text | the contents of the element is retained, but the element name is lost
attribute | text | the value of the attribute is retained, but the attribute name is lost

Invalid node type changes

  1. Type changes cannot occur for nodes which have children.
  2. The root node cannot have its type changed.


Exiting XML Notepad

To exit XML Notepad, select Exit from the File menu.


Inserting an XML Node

This section describes how to insert nodes into your XML document.


Inserting an element

  1. Highlight the node after which to insert the element.
  2. Select Element from the Insert menu.

The new element will become a sibling of the highlighted node.


Inserting a child element

  1. Highlight the node that is to be the parent of the child element.
  2. Select Child Element from the Insert menu.


Inserting an attribute

  1. Highlight the node on which to insert the attribute.
  2. Select Attribute from the Insert menu.

    note: an attribute can only be added to an element.


Inserting text

  1. Highlight the node for which you would like to add a text node.
  2. Select Text from the Insert menu.


Inserting a comment

  1. Highlight the node after which or in which to insert the comment. If the highlighted node is expanded, the comment will be inserted within the highlighted node. If the highlighted node is collapsed, the comment will be inserted after the highlighted node.
  2. Select Comment from the Insert menu.

    note: comments can be added to elements only.


Using the toolbar functions

The following topics describe how to use the toolbar functions to create and edit XML documents.


Promoting and demoting a node

An XML document is a tree-like structure. This tree consists of nodes that possess a hierarchical relationship to each other. To promote or demote a node is to raise or lower that node to a different level within that hierarchy.

Promoting a node

  1. Highlight the node to promote.
  2. In the Toolbar, click on [image] (Alt + Shift + Left).

Promoting a node will cause it to move one level higher.

Demoting a node

  1. Highlight the node to demote.
  2. In the Toolbar, click on [image] (Alt + Shift + Right).

Demoting a node will cause it to move one level deeper.


Moving nodes up and down

This feature enables you to reorder the children of a particular node. Moving nodes up and down does not, however, affect the heirarchical structure of the document.

  1. Highlight the node to move.
  2. In the Toolbar, click on [image] (Alt + Shift + Up) or [image] (Alt + Shift + Down).


Expanding and collapsing a node

This feature enables you to show and hide specific nodes or the entire tree.

Expanding a single node

  1. Highlight the node to expand.
  2. In the Toolbar, click on [image] (Alt + Shift + +).

Collapsing a single node

  1. Highlight the node to collapse.
  2. In the Toolbar, click on [image] (Alt + Shift + -).

Expanding the entire tree

  1. In the Toolbar, click on [image] (Alt + Shift + 9).

Collapsing the entire tree

  1. In the Toolbar, click on [image] (Alt + Shift + 1).


Customizing your workspace

The following topics describe how to customize your workspace by hiding and showing the toolbar and status bar and by adjusting the screen split.


Showing and Hiding the Toolbar

Showing the Toolbar

To display the toolbar, select Toolbar from the View menu. A check will appear next to the word Toolbar.

Hiding the Toolbar

To hide the toolbar, select Toolbar from the View menu. The check will no longer appear next to the word Toolbar.


Showing and Hiding the Status Bar

Showing the Status Bar

To display the status bar, select Status Bar from the View menu. A check will appear next to the word Status Bar.

Hiding the Status Bar

To hide the status bar, select Status Bar from the View menu. The check will no longer appear next to the word Status Bar.


Adjusting the screen split

To adjust the screen split, select Split from the View menu. This will result in the cursor changing to a split control pointer. By moving the mouse or pressing the right and left key strokes, you can adjust the split to your preference.


Demote a node

  1. Highlight the node to demote. Demoting a node will cause it to move one level deeper.
  2. In the Toolbar, click on [image].


Inserting an XML Node

  1. Highlight the node for which you would like to add a text node.
  2. Select Text from the Insert menu.


Does XML Notepad work with lowercase tags?

Currently all tag names are converted to uppercase upon loading a document. Tags entered in lowercase remain in lower case upon saving the document however, when re-opening the same document, tag names are converted to uppercase.