Home

 

Editing in the Source tab

We continue to work on the XML file we generated in the last section:

In the Source tab, place your cursor after the closing tag </itso:account>.

Press Ctrl+Space to activate code assist. A pop-up list of available choices, which is based on the context, is displayed. Double-click <itso:account>.

Note: Content assist works because the document is associated with the schema we created, and the editor can use the schema to determine what is valid content for specific locations in the document. The start tag shows how this is association is specified:

<itso:accounts xmlns:itso="http://itso.rad75.xml.com"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://itso.rad75.xml.com Accounts.xsd ">

While the cursor is still between <itso:account> tags, press Ctrl+Space and double-click <itso:accountID>.

Type a number for accountID between the start and end tags.

Repeat the same procedure to use the code assist feature to input the rest of the information, such as accountType, balance, and so forth. Note that all child tags are required.

After you finish typing, you can right-click in the XML source area and select Format Æ Document.
ibm.com/redbooks