Chilkat HOME ASP Visual Basic VB.NET C# Visual C++ C MFC Delphi FoxPro Java Perl PHP Python Ruby SQL Server VBScript
|
Parse a Google SitemapHow to parse a Google sitemap. CREATE PROCEDURE ChilkatSample AS BEGIN DECLARE @hr int DECLARE @iTmp0 int DECLARE @xml int EXEC @hr = sp_OACreate 'Chilkat.Xml', @xml OUT IF @hr <> 0 BEGIN PRINT 'Failed to create ActiveX component' RETURN END -- The Chilkat XML component is freeware. -- Load an XML sitemap: EXEC sp_OAMethod @xml, 'LoadXmlFile', NULL, 'sitemap.xml' -- Iterate over the URL nodes: DECLARE @xUrl int EXEC sp_OAMethod @xml, 'FirstChild', @xUrl OUT -- Loop over the records in the sitemap and display each URL. WHILE !(@xUrl Is Nothing ) BEGIN EXEC sp_OAMethod @xUrl, 'GetChildContent', @iTmp0 OUT, 'loc' PRINT @iTmp0 EXEC sp_OAMethod @xUrl, 'NextSibling', @xUrl OUT END END GO |
Need a specific example? Send a request to support@chilkatsoft.com
© 2000-2007 Chilkat Software, Inc. All Rights Reserved.