Thursday, 6 November 2014

Get all child in xml via powershell without named tag



I need in powershell load xml and show all name of nodes without set parent. Is it possible? Here my code:



[xml]$changesXML = Get-Content $PathToXML
function ReplaceOneFormat
{
Param(
$Parent
)
foreach($child in $Parent)
{
$child.Name?
#ReplaceOneFormat $child # call this function by recursive
}
}

ReplaceOneFormat $changesXML

No comments:

Post a Comment