B4X
B4X
SearchAllForContent
See more XML Examples
Demonstrates the SearchAllForContent method.Chilkat B4X Downloads
Dim success As Boolean = False
Dim xml As ChilkatXml
xml.Initialize
Dim xBeginAfter As ChilkatXml
Dim xFound As ChilkatXml
success = xml.LoadXmlFile("qa_data/xml/pigs.xml")
If success <> True Then
Log(xml.LastErrorText)
Return
End If
xBeginAfter = xml.GetSelf
xFound = xml.SearchAllForContent(xBeginAfter, "*pig*")
Dim searchForMore As Boolean = True
Do While (searchForMore = True)
Log(xFound.Tag)
Log(xFound.Content)
Log("--")
xBeginAfter = xFound
xFound = xml.SearchAllForContent(xBeginAfter, "*pig*")
searchForMore = xml.LastMethodSuccess
Loop