Sample code for 30+ languages & platforms
Classic ASP

SearchAllForContent

See more XML Examples

Demonstrates the SearchAllForContent method.

Chilkat Classic ASP Downloads

Classic ASP
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<%
success = 0

set xml = Server.CreateObject("Chilkat.Xml")

success = xml.LoadXmlFile("qa_data/xml/pigs.xml")
If (success <> 1) Then
    Response.Write "<pre>" & Server.HTMLEncode( xml.LastErrorText) & "</pre>"
    Response.End
End If

' xBeginAfter is a Chilkat.Xml
Set xBeginAfter = xml.GetSelf()
' xFound is a Chilkat.Xml
Set xFound = xml.SearchAllForContent(xBeginAfter,"*pig*")
searchForMore = 1
Do While (searchForMore = 1)

    Response.Write "<pre>" & Server.HTMLEncode( xFound.Tag) & "</pre>"
    Response.Write "<pre>" & Server.HTMLEncode( xFound.Content) & "</pre>"
    Response.Write "<pre>" & Server.HTMLEncode( "--") & "</pre>"

    ' xBeginAfter is a Chilkat.Xml
    Set xBeginAfter = xFound
    ' xFound is a Chilkat.Xml
    Set xFound = xml.SearchAllForContent(xBeginAfter,"*pig*")

    searchForMore = xml.LastMethodSuccess
Loop


%>
</body>
</html>