GetAllSubWebCollection Method
The GetAllSubWebCollection method of the Webs service returns the titles and URLs of all sites within the current site collection.
Return Value
An XML fragment in the following form that can be assigned to a System.Xml.XmlNode object:
<Webs xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<Web Title="Site1_Name" Url="http://Server_Name/sites/Site_Name" />
<Web Title="Site2_Name" Url="http://Server_Name/sites/Site_Name/Subsite_1" />
<Web Title="Site3_Name" Url="http://Server_Name/sites/Site_Name/Subsite_1/Subsite_2" />
.
.
.
</Webs>
Example
The following code example displays the titles of all the sites within the current site collection.
This example requires that a using (C#) or Imports (Visual Basic .NET) directive be included for the System.Xml namespace.
Requirements
Platforms: Microsoft Windows Server 2003
Web Reference: http://Server_Name/[sites/][Site_Name/]_vti_bin/Webs.asmx