Xbase++
Xbase++
SearchAllForContent
See more XML Examples
Demonstrates the SearchAllForContent method.Chilkat Xbase++ Downloads
LOCAL nSuccess
LOCAL oXml
LOCAL oXBeginAfter
LOCAL oXFound
LOCAL nSearchForMore
nSuccess := 0
oXml := CreateObject("Chilkat.Xml")
nSuccess := oXml:LoadXmlFile("qa_data/xml/pigs.xml")
IF (nSuccess != 1)
? oXml:LastErrorText
oXml:destroy()
RETURN
ENDIF
oXBeginAfter := oXml:GetSelf()
oXFound := oXml:SearchAllForContent(oXBeginAfter, "*pig*")
nSearchForMore := 1
DO WHILE (nSearchForMore == 1)
? oXFound:Tag
? oXFound:Content
? "--"
oXBeginAfter:destroy()
oXBeginAfter := oXFound
oXFound := oXml:SearchAllForContent(oXBeginAfter, "*pig*")
nSearchForMore := oXml:LastMethodSuccess
ENDDO
oXBeginAfter:destroy()
oXml:destroy()