(Classic ASP) SearchAllForContent
Demonstrates the SearchAllForContent method.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<%
set xml = Server.CreateObject("Chilkat_9_5_0.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_9_5_0.Xml
Set xBeginAfter = xml.GetSelf()
' xFound is a Chilkat_9_5_0.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_9_5_0.Xml
Set xBeginAfter = xFound
' xFound is a Chilkat_9_5_0.Xml
Set xFound = xml.SearchAllForContent(xBeginAfter,"*pig*")
searchForMore = xml.LastMethodSuccess
Loop
%>
</body>
</html>
|