classes/phing/tasks/ext/XmlPropertyTask.php
Task for setting properties from an XML file in buildfiles.
- author
- Jonathan Bond-Caron
- link
- http://ant.apache.org/manual/CoreTasks/xmlproperty.html
- package
- phing.tasks.ext
- since
- 2.4.0
- version
- $Revision: 1110 $
\XmlPropertyTask
Task for setting properties from an XML file in buildfiles.
Use {@link Project#createTask} to register a new Task.
- Extends from
- \PropertyTask
- author
- Jonathan Bond-Caron
- copyright
- 2001,2002 THYRELL. All rights reserved
- link
- http://ant.apache.org/manual/CoreTasks/xmlproperty.html
- package
- phing.tasks.ext
- since
- 2.4.0
- version
- $Revision: 1110 $
Properties
Methods

_addNode(
\SimpleXMLElement $node, array $path, \Properties $prop
)
:
voidAdds an XML node
| Name | Type | Description |
|---|---|---|
| $node | \SimpleXMLElement | |
| $path | array | Path to this node |
| $prop | \Properties | Properties will be added as they are found (by reference here) |

_getProperties(
string $filePath
)
:
\PropertiesParses an XML file and returns properties
| Name | Type | Description |
|---|---|---|
| $filePath | string |
| Type | Description |
|---|---|
| \Properties |

loadFile(
\PhingFile $file
)
:
load properties from an XML file.
| Name | Type | Description |
|---|---|---|
| $file | \PhingFile |

main(
)
:
set the property in the project to the value.
if the task was give a file or env attribute here is where it is loaded

setCollapseAttributes(
bool $yesNo
)
:
Treat attributes as nested elements.
| Name | Type | Description |
|---|---|---|
| $yesNo | bool |

setDelimiter(
string $d
)
:
Delimiter for splitting multiple values.
| Name | Type | Description |
|---|---|---|
| $d | string |

setFile(
$file
)
:
Set a file to use as the source for properties.
| Name | Type | Description |
|---|---|---|
| $file |

setKeepRoot(
bool $yesNo
)
:
Keep the xml root tag as the first value in the property name
| Name | Type | Description |
|---|---|---|
| $yesNo | bool |