Sample code for 30+ languages & platforms
Lianja

SearchAllForContent

See more XML Examples

Demonstrates the SearchAllForContent method.

Chilkat Lianja Downloads

Lianja
llSuccess = .F.

loXml = createobject("CkXml")

llSuccess = loXml.LoadXmlFile("qa_data/xml/pigs.xml")
if (llSuccess <> .T.) then
    ? loXml.LastErrorText
    release loXml
    return
endif

loXBeginAfter = loXml.GetSelf()
loXFound = loXml.SearchAllForContent(loXBeginAfter,"*pig*")
llSearchForMore = .T.
do while (llSearchForMore = .T.)

    ? loXFound.Tag
    ? loXFound.Content
    ? "--"

    release loXBeginAfter
    loXBeginAfter = loXFound
    loXFound = loXml.SearchAllForContent(loXBeginAfter,"*pig*")

    llSearchForMore = loXml.LastMethodSuccess
enddo

release loXBeginAfter


release loXml