Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7778839
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T18:29:57+00:00 2026-06-01T18:29:57+00:00

I have the following XML structure: <servers> <hostname>ABC01</hostname> <hostname>ABC02</hostname> </servers> I need to retrieve

  • 0

I have the following XML structure:

<servers>
    <hostname>ABC01</hostname>
    <hostname>ABC02</hostname>
</servers>

I need to retrieve a file from each server, from a folder I know, attach it to an email and then send it.

What would be the approach for this?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T18:29:58+00:00Added an answer on June 1, 2026 at 6:29 pm

    Use the xmlproperty task to load an XML file into properties.

    Then use the for task from ant-contrib to act upon each of the matched properties.

    Something like:

    <target name="funtimes">
        <xmlproperty file="the.xml" delimiter=","/>
        <for list="${servers.hostname}" param="hostname">
            <sequential>
                <echo>Doing things with @{hostname}</echo>
            </sequential>
        </for>
    </target>
    

    Fetching files depends upon how you are planning to access them. The scp task might help.

    For sending email you can use the mail task.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have following object structure, deseralized from XML (WS): <ns2:Category> <ns2:CategoryId>800003</ns2:CategoryId> <ns2:CategoryName>Name1</ns2:CategoryName> <ns2:Categories> <ns2:Category>
I have an xml file with the following structure: <main_tag> <first> <tag1>val1</tag1> <conf> <tag2>val2</tag2>
I have a large xml file (approx. 10 MB) in following simple structure: <Errors>
I have an xml file with following structure: <table name=tblcats> <row> <Id>3680</Id> <Industry>Associations</Industry> <ParentId>1810</ParentId>
I have a following XML structure that I need to transform: <recordset rowCount=68 fieldNames=ITEM,ECL,LEAD_TIME
I am converting code from c# to java. I have the following xml structure:
I have the following XML structure: <agencies> <city> <name>New York</name> <address>Street A, 101</address> <phone>111-222-333</phone>
I have the following XML structure: <Main> <Node1>Definite</Node1> <Node2>Definite</Node2> <Node3>Definite</Node3> <Node4>Definite</Node4> <Node5>Definite</Node5> <Node6>Definite</Node6> <A>Possible</A>
I have dumped the following XML structure. $VAR1 = { 'events' => {}, 'docvalues'
I have the following XML source structure: <turnovers> <turnover repid=1 amount=500 rate=0.1/> <turnover repid=5

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.