PowerShell
PowerShell
SearchAllForContent
See more XML Examples
Demonstrates the SearchAllForContent method.Chilkat PowerShell Downloads
Add-Type -Path "C:\chilkat\ChilkatDotNet47-x64\ChilkatDotNet47.dll"
$success = $false
$xml = New-Object Chilkat.Xml
$success = $xml.LoadXmlFile("qa_data/xml/pigs.xml")
if ($success -ne $true) {
$($xml.LastErrorText)
exit
}
$xBeginAfter = $xml.GetSelf()
$xFound = $xml.SearchAllForContent($xBeginAfter,"*pig*")
$searchForMore = $true
while (($searchForMore -eq $true)) {
$($xFound.Tag)
$($xFound.Content)
$("--")
$xBeginAfter = $xFound
$xFound = $xml.SearchAllForContent($xBeginAfter,"*pig*")
$searchForMore = $xml.LastMethodSuccess
}