Editing resource XML

Use the XML editor to make it easier to edit XML files.

Before you begin

Read the following information before beginning this procedure:

  • Much of the data used within Netcool Configuration Manager is in XML format. When working with the Resource Browser, you do not need to worry about the XML that forms resource configurations and command sets because the Configuration Editor translates the XML into easily editable GUI objects such as lists, fields, and check boxes.
  • To create or edit security sets, authentication resources, and network resource access properties, however, you must work with the actual XML. To make working with the XML easier, a simple XML editor is used.

About this task

Follow these steps to use the XML editor to edit an XML file.

Procedure

  1. To view XML, right click on the resource and select Resource Access from the drop down menu.

    The XML editor displays the XML code associated with the selected resource.

  2. Use breaks and spaces (tabs) to make the data in the XML file easier to read.
    Note: When working with XML, spaces and line breaks do not matter.
  3. Check for errors.

    The simple XML editor checks for errors (for example, missing angle brackets). The XML editor provides the line number where the error occurs along with a brief description of the issue. The editor checks for well-formed XML only. You still need to ensure that all attribute names are correct.

    When you view an Authentication general resource (GR) that has a password or enable password making use of special characters (for example, the ampersand (&) in the Preview screen (File > Preview) or in XML format, the character will be displayed in its escaped form, that is, &amp.

  4. When finished creating or editing an XML document, select File > Save.

Example

The following example shows the XML code for a resource access general resource:

<?xml version="1.0" encoding="UTF-8"?><resource-access-data>
    <access-order>
        <name>telnet</name>
    </access-order>
    <rollback-options>
        <option name="NO_ROLLBACK">
            <description>No rollback</description>
            <required>false</required>
            <recommended>false</recommended>
        </option>
        <option name="MODELLED_ROLLBACK">
            <description>Use modelled rollback</description>
            <required>false</required>
            <recommended>true</recommended>
        </option>
        <option name="REBOOT_ROLLBACK">
            <description>Reload the configuration and reboot the device.
					 </description>
            <required>false</required>
            <recommended>false</recommended>
        </option>
    </rollback-options>
    <access-types>
        <access-type name="ssh">
            <script-id>ssh</script-id>
            <ssh-type>ssh1</ssh-type>
            <streaming-put-flag>false</streaming-put-flag>
            <streaming-get-flag>true</streaming-get-flag>
            <native-compare-flag>false</native-compare-flag>
            <import-prewrite-flag>true</import-prewrite-flag>
            <sync-prewrite-flag>true</sync-prewrite-flag>
            <import-report-diffs-flag>false</import-report-diffs-flag>
            <configDataType>CLI</configDataType>
            <reboot-on-config-load>true</reboot-on-config-load>
            <import-char-streaming-flag>false</import-char-streaming-flag>
            <import-char-streaming-time-interval>0
            </import-char-streaming-time-interval>
            <lbl-mode-flag-forncs>true</lbl-mode-flag-forncs>
            <user/>
            <password/>
            <enable-password/>
            <prev-user/>
            <alt-user/>
            <prev-password/>
            <alt-password/>
            <prev-enable-password/>
            <alt-enable-password/>
            <hostname/>
            <port>22</port>
            <ssh1>
                <cipher>des</cipher>
            </ssh1>
            <ssh2>
                <cipher>blowfish</cipher>
            </ssh2>
            <connectResponseTimeout/>
            <connectRetryDelay/>
            <maxResponseTimeout/>
            <ResponseTimeout/>
            <socketConnectTimeout/>
            <additional-errors/>
            <compareDeviceAndIntelliden>true
            </compareDeviceAndIntelliden>
            <finalConfigCompare>false</finalConfigCompare>
            <multipleConfigCompare/>
            <disableConfigChecksOnChanges>false
            </disableConfigChecksOnChanges>
            <retry-errors/>
            <retry-error-delay/>
            <max-error-retries/>
            <useOsUpgradeDefaultMethod>true</useOsUpgradeDefaultMethod>
        </access-type>
        <access-type name="telnet">
            <script-id>default</script-id>
            <ssh-type>none</ssh-type>
            <streaming-put-flag>false</streaming-put-flag>
            <streaming-get-flag>true</streaming-get-flag>
            <native-compare-flag>false</native-compare-flag>
            <import-prewrite-flag>true</import-prewrite-flag>
            <sync-prewrite-flag>true</sync-prewrite-flag>
            <import-report-diffs-flag>false</import-report-diffs-flag>
            <configDataType>CLI</configDataType>
            <reboot-on-config-load>true</reboot-on-config-load>
            <import-char-streaming-flag>false</import-char-streaming-flag>
            <import-char-streaming-time-interval>0
            </import-char-streaming-time-interval>
            <lbl-mode-flag-forncs>true</lbl-mode-flag-forncs>
            <user/>
            <password/>
            <enable-password/>
            <prev-user/>
            <alt-user/>
            <prev-password/>
            <alt-password/>
            <prev-enable-password/>
            <alt-enable-password/>
            <hostname/>
            <port>23</port>
            <ssh1>
                <cipher>des</cipher>
            </ssh1>
            <ssh2>
                <cipher>blowfish</cipher>
            </ssh2>
            <connectResponseTimeout/>
            <connectRetryDelay/>
            <maxResponseTimeout/>
            <ResponseTimeout/>
            <socketConnectTimeout/>
            <additional-errors/>
            <compareDeviceAndIntelliden>true
            </compareDeviceAndIntelliden>
            <finalConfigCompare>false</finalConfigCompare>
            <multipleConfigCompare/>
            <disableConfigChecksOnChanges>false
            </disableConfigChecksOnChanges>
            <retry-errors/>
            <retry-error-delay/>
            <max-error-retries/>
            <useOsUpgradeDefaultMethod>true</useOsUpgradeDefaultMethod>
        </access-type>
        <access-type name="snmp">
            <snmp-version>2c</snmp-version>
            <snmp-getbulk-max-reps>10</snmp-getbulk-max-reps>
            <snmp-allow-oids-out-of-order>false
            </snmp-allow-oids-out-of-order>
            <script-id>snmp</script-id>
            <ssh-type>none</ssh-type>
            <streaming-put-flag>false</streaming-put-flag>
            <streaming-get-flag>true</streaming-get-flag>
            <native-compare-flag>false</native-compare-flag>
            <import-prewrite-flag>true</import-prewrite-flag>
            <sync-prewrite-flag>true</sync-prewrite-flag>
            <import-report-diffs-flag>false</import-report-diffs-flag>
            <configDataType/>
            <reboot-on-config-load>true</reboot-on-config-load>
            <import-char-streaming-flag>false
            </import-char-streaming-flag>
            <import-char-streaming-time-interval>0
            </import-char-streaming-time-interval>
            <lbl-mode-flag-forncs>true</lbl-mode-flag-forncs>
            <user/>
            <password/>
            <enable-password/>
            <prev-user/>
            <alt-user/>
            <prev-password/>
            <alt-password/>
            <prev-enable-password/>
            <alt-enable-password/>
            <hostname/>
            <port>161</port>
            <ssh1>
                <cipher>des</cipher>
            </ssh1>
            <ssh2>
                <cipher>blowfish</cipher>
            </ssh2>
            <connectResponseTimeout/>
            <connectRetryDelay/>
            <maxResponseTimeout/>
            <ResponseTimeout/>
            <socketConnectTimeout/>
            <additional-errors/>
            <compareDeviceAndIntelliden>true
            </compareDeviceAndIntelliden>
            <finalConfigCompare>false</finalConfigCompare>
            <multipleConfigCompare/>
            <disableConfigChecksOnChanges>false
            </disableConfigChecksOnChanges>
            <retry-errors/>
            <retry-error-delay/>
            <max-error-retries/>
            <useOsUpgradeDefaultMethod>true
            </useOsUpgradeDefaultMethod>
        </access-type>
        <access-type name="alt-telnet">
            <script-id>alt-telnet</script-id>
            <ssh-type>none</ssh-type>
            <streaming-put-flag>false</streaming-put-flag>
            <streaming-get-flag>true</streaming-get-flag>
            <native-compare-flag>false</native-compare-flag>
            <import-prewrite-flag>true</import-prewrite-flag>
            <sync-prewrite-flag>true</sync-prewrite-flag>
            <import-report-diffs-flag>false</import-report-diffs-flag>
            <configDataType/>
            <reboot-on-config-load>true</reboot-on-config-load>
            <import-char-streaming-flag>false
            </import-char-streaming-flag>
            <import-char-streaming-time-interval>0
            </import-char-streaming-time-interval>
            <lbl-mode-flag-forncs>true</lbl-mode-flag-forncs>
            <user/>
            <password/>
            <enable-password/>
            <prev-user/>
            <alt-user/>
            <prev-password/>
            <alt-password/>
            <prev-enable-password/>
            <alt-enable-password/>
            <hostname>10.216.1.254</hostname>
            <port>2034</port>
            <ssh1>
                <cipher>des</cipher>
            </ssh1>
            <ssh2>
                <cipher>blowfish</cipher>
            </ssh2>
            <connectResponseTimeout/>
            <connectRetryDelay/>
            <maxResponseTimeout/>
            <ResponseTimeout/>
            <socketConnectTimeout/>
            <additional-errors/>
            <compareDeviceAndIntelliden>true
            </compareDeviceAndIntelliden>
            <finalConfigCompare>false</finalConfigCompare>
            <multipleConfigCompare/>
            <disableConfigChecksOnChanges>false
            </disableConfigChecksOnChanges>
            <retry-errors/>
            <retry-error-delay/>
            <max-error-retries/>
            <useOsUpgradeDefaultMethod>true
            </useOsUpgradeDefaultMethod>
        </access-type>
    </access-types>
    <scripts>
<script name="example-script"><![CDATA[ ### Defaults for sending commands.
Errors must be separated by , not spaces default.prompt=enable)
default.error=Error,Usage,Unknown command,Failed,must be in the range,
Cannot add,Invalid,must be less than,Feature not supported,Bad mod,
Unknown host,failed,VLAN number must be in the range,VLAN name and 
state may be set default.errorResponse=Error sending command  
### Connection Global # if connect.* is not present use connect.all.properties 
connect.errorResponse=Unable to connect to router connect.01.if=name: 
connect.02.then=send=$connect_username$ connect.03.elseIf=ogin: 
connect.04.then=send=$connect_username$ connect.05.endIf 
connect.06.wait=assword: connect.07.send=$connect_password$ 
connect.08.send=en connect.09.if=: 
connect.10.then=send=$enable_password$ 
connect.11.endIf connect.12.wait=enable) connect.13.send=set 
length 0 connect.14.wait=enable)  ### Get configuration 
config.errorResponse=ciscoCat Configuration Error 
# Info diag.01.send=show version diag.02.wait=enable) 
diag.03.send=show module diag.end=enable)  
# Model model.send=show version model.end=enable) 
model.FIND-BEGIN=Model:  model.FIND-END=Serial # check for 
Running config and stored config values multipleConfigs or 
SingleConfig config.check.end=singleConfig  
# copy Running config to stored copyRunning.01.send=  
# Running config config.running.send=show config all config.running.end=
end config.running.FIND-BEGIN=#version  config.running.FIND-END=end  
# Stored config config.stored.send=show config all config.stored.end=
end config.stored.FIND-BEGIN=#version  config.stored.FIND-END=end  
# Version config.version.send=show version config.version.end=enable) 
config.version.FIND-BEGIN=NmpSW:  config.version.FIND-END=  
# Signals start of config config.start=!  # Signals end of config 
config.end=end  # Identifies error retreiving config. 
Errors must be separated by , 
not spaces config.fail=Error,Usage,Unknown command,Failed,must be in 
the range,must be less than,Feature not supported  
### Disconnect disconnect.errorResponse=Error disconnecting from device.  
### Ftp file ftp.01.send=copy tftp config ftp.02.wait=? 
ftp.03.send=$ftp_hostname$ ftp.04.wait=? ftp.05.send=$ftp_filename$ 
ftp.06.wait=? ftp.07.send=y ftp.08.wait=enable)  ### stream file 
streamFile.01.sendData=$stream_input$ streamFile.02.wait=enable) 
### Notify logged on users notify.message.send=$message$  
### Directory dir.01.send=dir $dir_input$ dir.02.wait=)  
### del del.01.send=del $del_input$ del.02.if=? del.03.then=send=y 
del.04.endIf del.05.wait=enable)  ### Change directory cd.01.send=cd 
$cd_input$: cd.02.wait=#  ### Squeeze directory squeeze.01.send=squeeze 
$squeeze_input$: squeeze.02.wait=? squeeze.03.send=y squeeze.04.wait=? 
squeeze.05.send=y squeeze.06.wait=enable)  ### Copy copyDown.01.send=copy 
tftp flash copyDown.02.wait=? copyDown.03.send=$ftp_althostname$ 
copyDown.04.wait=? copyDown.05.send=$copy_input1$ copyDown.06.if=[bootflash]? 
copyDown.07.then=send= copyDown.08.endIf copyDown.09.if=copy 
to [ copyDown.10.then=send= copyDown.11.endIf copyDown.12.wait=? 
copyDown.13.send=y copyDown.14.wait=enable) copyDown.15.sleep=5000 
copyDown.16.send=verify $copy_input1$ copyDown.17.wait=enable)  
### Erase erase.01.send=erase $erase_input$: erase.02.wait=? 
erase.03.send=y erase.04.wait=#  ### reload reload.01.send=reset 
reload.02.wait=? reload.03.send=y reload.04.sleep=240000]]&gt;</script>
    </scripts>
</resource-access-data>

What to do next

You can edit another XML file by using this procedure.