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
Package: phing\tasks\ext
Parameters
Details
Task for setting properties from an XML file in buildfiles.
- Parent(s)
- \PropertyTask < \Task < \ProjectComponent
- Author
- Jonathan Bond-Caron
- Link
- http://ant.apache.org/manual/CoreTasks/xmlproperty.html
- Since
- 2.4.0
- Version
- $Revision: 1110 $
Properties
Methods

_addNode(
\SimpleXMLElement $node, array $path, \Properties $prop
)
:
voidAdds an XML node
Parameters
| 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
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $filePath | string |
| Type | Description |
|---|---|
| \Properties |

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

main(
)
:
voidset 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
)
:
voidTreat attributes as nested elements.
Parameters
| Name | Type | Description |
|---|---|---|
| $yesNo | bool |

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

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

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

setPrefix(
string $prefix
)
:
voidPrefix to apply to properties loaded using file.
A "." is appended to the prefix if not specified.
| Name | Type | Description |
|---|---|---|
| $prefix | string | prefix string |
- Since
- 2.0