Sample code for 30+ languages & platforms
AutoIt

SearchAllForContent

See more XML Examples

Demonstrates the SearchAllForContent method.

Chilkat AutoIt Downloads

AutoIt
Local $bSuccess = False

$oXml = ObjCreate("Chilkat.Xml")
Local $oXBeginAfter
Local $oXFound

$bSuccess = $oXml.LoadXmlFile("qa_data/xml/pigs.xml")
If ($bSuccess <> True) Then
    ConsoleWrite($oXml.LastErrorText & @CRLF)
    Exit
EndIf

$oXBeginAfter = $oXml.GetSelf()
$oXFound = $oXml.SearchAllForContent($oXBeginAfter,"*pig*")
Local $bSearchForMore = True
While ($bSearchForMore = True)

    ConsoleWrite($oXFound.Tag & @CRLF)
    ConsoleWrite($oXFound.Content & @CRLF)
    ConsoleWrite("--" & @CRLF)

    $oXBeginAfter = $oXFound
    $oXFound = $oXml.SearchAllForContent($oXBeginAfter,"*pig*")

    $bSearchForMore = $oXml.LastMethodSuccess
Wend