UnitTest( sitemap.asp )


<?xml version='1.0' encoding='UTF-8'?>
<urlset xmlns='http://www.sitemaps.org/schemas/sitemap/0.9'>



<!--#include virtual="/lib/unit-tests.asp"-->
<!--#include virtual="/lib/axe/classes/interface.asp"-->
<!--#include virtual="/lib/axe/classes/Parsers/json2.asp"-->
<!--#include virtual="/lib/axe/classes/Utilities/stringbuilder.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xml:lang="en">
		<title>AXE - Unit Test - SiteMap</title>
		<!--// meta tags //-->
		<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
		<!--// link tags //-->
		<link rel="stylesheet" type="text/css" media="screen" href="/lib/unit-tests.css" />
		<div id="container">
			<div id="container-hd">
				<h1>UnitTest( sitemap.asp )</h1>
			<div id="container-bd">
<div class="code"><pre><%
class SiteMap
' --[ Public section ]----------------------------------------------------------
	public property get classType()
		classType = typename(Me)
	end property
	public property get classVersion()
		classVersion = "1.0.0"
	end property
	public sub append(byRef node)
	end sub
	public function serialize()
		dim entry
		with (new StringBuilder)
			.append "<?xml version='1.0' encoding='UTF-8'?>"
			.append vbLf
			.append "<urlset xmlns='http://www.sitemaps.org/schemas/sitemap/0.9'>"
			.append vbLf
			for each entry in [Ω].enumerate()
				.append entry.serialize()
			.append "</urlset>"
			.append vbLf
			serialize = .toString()
		end with
	end function
' --[ Private section ]---------------------------------------------------------
	private [Ω]
	private sub Class_initialize()
		set [Ω] = JSON.parse("[]")
	end sub
	private sub Class_terminate()
		set [Ω] = nothing
	end sub
end class
with (new SiteMap)
	Response.write replace( .serialize(), "<", "&lt;" )
end with
			<div id="container-ft">
				<h3><%= Request.ServerVariables("SCRIPT_NAME") %></h3>
				<div class="code"><%= geshify( loadTextFile( Server.mapPath( Request.ServerVariables("SCRIPT_NAME") ) ), "asp" ) %></div>
		<!--// javascript tags //-->