Chilkat
HOME
Android™
ASP
Visual Basic
VB.NET
C#
iOS (IPhone)
Objective-C
C++
C
MFC
Delphi
FoxPro
Java
Perl
PHP Extension
PHP ActiveX
Python
PowerShell
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 |
© 2000-2010 Chilkat Software, Inc. All Rights Reserved.