You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

loadresource.html 1.8 KiB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <html>
  2. <head>
  3. <link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
  4. <title>LoadResource Task</title>
  5. </head>
  6. <body>
  7. <h2><a name="loadresource">LoadResource</a></h2>
  8. <p><em>Since Ant 1.7</em></p>
  9. <h3>Description</h3>
  10. <p>
  11. Load a text resource into a single property. Unless an encoding is
  12. specified, the encoding of the current locale is used. Resources to
  13. load are specified as nested <a
  14. href="../CoreTypes/resources.html">resource</a> elements or single
  15. element resource collections.
  16. </p>
  17. <h3>Parameters</h3>
  18. <table border="1" cellpadding="2" cellspacing="0">
  19. <tr>
  20. <td valign="top"><b>Attribute</b></td>
  21. <td valign="top"><b>Description</b></td>
  22. <td align="center" valign="top"><b>Required</b></td>
  23. </tr>
  24. <tr>
  25. <td valign="top">property</td>
  26. <td valign="top">property to save to</td>
  27. <td valign="top" align="center">Yes</td>
  28. </tr>
  29. <tr>
  30. <td valign="top">encoding</td>
  31. <td valign="top">encoding to use when loading the resource</td>
  32. <td align="center" valign="top">No</td>
  33. </tr>
  34. <tr>
  35. <td valign="top">failonerror</td>
  36. <td valign="top">Whether to halt the build on failure</td>
  37. <td align="center" valign="top">No, default "true"</td>
  38. </tr>
  39. </table>
  40. <p>
  41. The LoadResource task supports nested <a href="../CoreTypes/filterchain.html">
  42. FilterChain</a>s.
  43. <h3>Examples</h3>
  44. <pre>
  45. &lt;loadresource property="homepage"&gt;
  46. &lt;url url="http://ant.apache.org/index.html"/&gt;
  47. &lt;/loadresource&gt;
  48. </pre>
  49. Load the entry point of Ant's homepage into property "homepage"; an
  50. <tt>&lt;echo&gt;</tt> can print this.
  51. <p>For more examples see the <a href="loadfile.html">loadfile</a> task.</p>
  52. <hr>
  53. <p align="center">Copyright &copy; 2001-2002,2004-2005 The Apache Software Foundation. All rights
  54. Reserved.</p>
  55. </body>
  56. </html>