(imported comment written by SystemAdmin)
Thanks boyd, that works brilliantly but now I can’t seem to get the information out of the file! I would like to get the IP address from the output file listed below but the file MAY have two different formats (see both below). Any suggestions as to how I could acheive this? I used the following working property relevance for the second file, but try as I have, I cannot get this to work with the first file and I certainly can’t combine them!
node values of attributes of selects “/RIBCL/LOGIN/RIB_INFO/MOD_NETWORK_SETTINGS/IP_ADDRESS” of xml document of file “C:\ilo_config.xml”
OUTPUT1:
<MOD_DIR_CONFIG>
<DIR_AUTHENTICATION_ENABLED VALUE = “N”/>
<DIR_LOCAL_USER_ACCT VALUE = “Y”/>
<DIR_SERVER_ADDRESS VALUE = “”/>
<DIR_SERVER_PORT VALUE = “x”/>
<DIR_OBJECT_DN VALUE = “”/>
<DIR_OBJECT_PASSWORD VALUE = “”/>
<DIR_USER_CONTEXT_1 VALUE = “”/>
<DIR_USER_CONTEXT_2 VALUE = “”/>
<DIR_USER_CONTEXT_3 VALUE = “”/>
</MOD_DIR_CONFIG>
<MOD_NETWORK_SETTINGS>
<SPEED_AUTOSELECT VALUE = “N”/>
<NIC_SPEED VALUE = “100”/>
<FULL_DUPLEX VALUE = “Y”/>
<IP_ADDRESS VALUE = “I.I.I.I”/>
<SUBNET_MASK VALUE = “x.x.x.x”/>
<GATEWAY_IP_ADDRESS VALUE = “x.x.x.x”/>
<DNS_NAME VALUE = “SERVERNAME-ILO”/>
<PRIM_DNS_SERVER value = “x.x.x.x”/>
<DHCP_ENABLE VALUE = “N”/>
<DOMAIN_NAME VALUE = “”/>
<DHCP_GATEWAY VALUE = “Y”/>
<DHCP_DNS_SERVER VALUE = “Y”/>
<DHCP_STATIC_ROUTE VALUE = “Y”/>
<DHCP_WINS_SERVER VALUE = “Y”/>
<REG_WINS_SERVER VALUE = “Y”/>
<PRIM_WINS_SERVER value = “x.x.x.x”/>
<STATIC_ROUTE_1 DEST = “0.0.0.0” GATEWAY = “0.0.0.0”/>
<STATIC_ROUTE_2 DEST = “0.0.0.0” GATEWAY = “0.0.0.0”/>
<STATIC_ROUTE_3 DEST = “0.0.0.0” GATEWAY = “0.0.0.0”/>
</MOD_NETWORK_SETTINGS>
<ADD_USER
USER_NAME = “USERNAME”
USER_LOGIN = “USERNAME”
PASSWORD = “”>
</ADD_USER>
<RESET_RIB VALUE = “Y”/>
OUTPUT2:
<DIR_INFO MODE=“write”>
<MOD_DIR_CONFIG>
<DIR_AUTHENTICATION_ENABLED VALUE = “N”/>
<DIR_LOCAL_USER_ACCT VALUE = “Y”/>
<DIR_SERVER_ADDRESS VALUE = “”/>
<DIR_SERVER_PORT VALUE = “X”/>
<DIR_OBJECT_DN VALUE = “”/>
<DIR_OBJECT_PASSWORD VALUE = “”/>
<DIR_USER_CONTEXT_1 VALUE = “”/>
<DIR_USER_CONTEXT_2 VALUE = “”/>
<DIR_USER_CONTEXT_3 VALUE = “”/>
</MOD_DIR_CONFIG>
</DIR_INFO>
<RIB_INFO MODE=“write”>
<MOD_NETWORK_SETTINGS>
<SPEED_AUTOSELECT VALUE = “N”/>
<NIC_SPEED VALUE = “100”/>
<FULL_DUPLEX VALUE = “Y”/>
<DHCP_ENABLE VALUE = “N”/>
<DHCP_GATEWAY VALUE = “Y”/>
<DHCP_DNS_SERVER VALUE = “Y”/>
<DHCP_STATIC_ROUTE VALUE = “Y”/>
<DHCP_WINS_SERVER VALUE = “Y”/>
<REG_WINS_SERVER VALUE = “Y”/>
<IP_ADDRESS VALUE = “I.I.I.I”/>
<SUBNET_MASK VALUE = “x.x.x.x”/>
<GATEWAY_IP_ADDRESS VALUE = “x.x.x.x”/>
<DNS_NAME VALUE = “SERVERNAME-ilo”/>
<DOMAIN_NAME VALUE = “DOMAINNAME”/>
<PRIM_DNS_SERVER value = “x.x.x.x”/>
<SEC_DNS_SERVER value = “x.x.x.x”/>
<TER_DNS_SERVER value = “0.0.0.0”/>
<PRIM_WINS_SERVER value = “x.x.x.x”/>
<SEC_WINS_SERVER value = “x.x.x.x”/>
<STATIC_ROUTE_1 DEST = “0.0.0.0” GATEWAY = “0.0.0.0”/>
<STATIC_ROUTE_2 DEST = “0.0.0.0” GATEWAY = “0.0.0.0”/>
<STATIC_ROUTE_3 DEST = “0.0.0.0” GATEWAY = “0.0.0.0”/>
</MOD_NETWORK_SETTINGS>
</RIB_INFO>
<USER_INFO MODE=“write”>
</USER_INFO>