First thanks for the quick responses; I have a csv file with hosts in on column and their IP address in the second. CSV format:

FTC-R17N6340-C04-1;10.1.70.1 FTC-R17N6340-C04-2,10.1.70.2 FTC-R17N6340-C04-3,10.1.70.3
My XML template has two instances of hostname that need to be replaced with the first collumn and one instance of ILO being replaced by the IP address. XML:
<host> <host>hostname</host> <name>hostname</name> <description/> <proxy/> <status>0</status> <ipmi_authtype>-1</ipmi_authtype> <ipmi_privilege>2</ipmi_privilege> <ipmi_username/> <ipmi_password/> <tls_connect>1</tls_connect> <tls_accept>1</tls_accept> <tls_issuer/> <tls_subject/> <tls_psk_identity/> <tls_psk/> <templates/> <groups> <group> <name>C7000 Chassis</name> </group> </groups> <interfaces> <interface> <default>1</default> <type>1</type> <useip>1</useip> <ip>ILO</ip> <dns/> <port>10050</port>
After the text is replaced I want the template with the new host information appended to the XML file but leaving the template intact ready for the second line.


In reply to Re^2: no output by DieringerC
in thread no output by DieringerC

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.