atom_lib.asp
上传用户:saigedz
上传日期:2019-10-14
资源大小:997k
文件大小:20k
源码类别:

中间件编程

开发平台:

HTML/CSS

  1. <Script Language="VBScript" RunAt="Server">
  2. '///////////////////////////////////////////////////////////////////////////////
  3. '//              RainbowSoft ATOM Export
  4. '// 作    者:    朱煊(zx.asd)
  5. '// 版权所有:    RainbowSoft Studio
  6. '// 技术支持:    rainbowsoft@163.com
  7. '// 程序名称:    
  8. '// 程序版本:    
  9. '// 单元名称:    atom_lib.asp
  10. '// 开始时间:    2005.07.27
  11. '// 最后修改:    
  12. '// 备    注:    ATOM输出
  13. '///////////////////////////////////////////////////////////////////////////////
  14. '*********************************************************
  15. ' 目的:    定义TAtom10Export类
  16. ' 输入:    无
  17. ' 返回:    无
  18. '*********************************************************
  19. Class TAtom10Export
  20. Public TimeZone
  21. Public Property Get xml
  22. xml = objXMLdoc.xml
  23. End Property
  24. Private objXMLdoc
  25. Private objXMLfeed
  26. Public Function GetFeed(objAtomFeed)
  27. Set objXMLfeed=objAtomFeed
  28. objXMLdoc.AppendChild(objXMLfeed)
  29. objXMLfeed.setAttribute "xmlns","http://www.w3.org/2005/Atom"
  30. Dim i
  31. Dim objItemNodes
  32. Set objItemNodes=objXMLfeed.getElementsByTagName("updated")
  33. For i=0 To (objItemNodes.Length-1)
  34. objItemNodes(i).Text=ParseDateForRFC3339(objItemNodes(i).Text)
  35. Next
  36. Set objItemNodes=Nothing
  37. End Function
  38. Public Function GetEntry(objEntryFeed)
  39. Dim i
  40. Dim objItemNodes
  41. Set objItemNodes=objEntryFeed.getElementsByTagName("updated")
  42. For i=0 To (objItemNodes.Length-1)
  43. objItemNodes(i).Text=ParseDateForRFC3339(objItemNodes(i).Text)
  44. Next
  45. Set objItemNodes=Nothing
  46. Set objItemNodes=objEntryFeed.getElementsByTagName("published")
  47. For i=0 To (objItemNodes.Length-1)
  48. objItemNodes(i).Text=ParseDateForRFC3339(objItemNodes(i).Text)
  49. Next
  50. Set objItemNodes=Nothing
  51. objXMLfeed.appendChild(objEntryFeed)
  52. End Function
  53. Public Function Execute()
  54. 'Response.ContentType = "text/html"
  55. Response.ContentType = "text/xml"
  56. Response.Clear
  57. Response.Write xml
  58. Execute=True
  59. End Function
  60. Public Function SaveToFile(strFileName)
  61. objXMLdoc.save(strFileName)
  62. SaveToFile=True
  63. End Function
  64. Function ParseDateForRFC3339(dtmDate)
  65. Dim dtmDay, dtmWeekDay, dtmMonth, dtmYear
  66. Dim dtmHours, dtmMinutes, dtmSeconds
  67. Dim strTimeZone
  68. dtmYear = Year(dtmDate)
  69. dtmMonth = Right("00" & Month(dtmDate),2)
  70. dtmDay = Right("00" & Day(dtmDate),2)
  71. dtmHours = Right("00" & Hour(dtmDate),2)
  72. dtmMinutes = Right("00" & Minute(dtmDate),2)
  73. dtmSeconds = Right("00" & Second(dtmDate),2)
  74. strTimeZone=Left(TimeZone,3) & ":" & Right(TimeZone,2)
  75. ParseDateForRFC3339 = dtmYear & "-" & dtmMonth & "-" & dtmDay & "T" & dtmHours & ":" & dtmMinutes & ":" & dtmSeconds & strTimeZone
  76. End Function 
  77. ' 类初始化
  78. Private Sub Class_Initialize()
  79. On Error Resume Next
  80. '对objXMLdoc进行初始化,如不能建对象则报错
  81. Set objXMLdoc =Server.CreateObject("Microsoft.XMLDOM")
  82. If Err.Number<>0 Then
  83. End If
  84. Dim objPI
  85. Set objPI = objXMLdoc.createProcessingInstruction("xml-stylesheet","type=""text/css"" href=""css/atom.css""")
  86. objXMLdoc.insertBefore objPI, objXMLdoc.childNodes(0)
  87. Set objPI = Nothing
  88. Set objPI = objXMLdoc.createProcessingInstruction("xml","version=""1.0"" encoding=""UTF-8"" standalone=""yes""")
  89. objXMLdoc.insertBefore objPI, objXMLdoc.childNodes(0)
  90. Set objPI = Nothing
  91. Set objXMLfeed = objXMLdoc.createElement("feed")
  92. End Sub
  93. ' 类释放
  94. Private Sub Class_Terminate()
  95. Set objXMLfeed = Nothing
  96. Set objXMLdoc  = Nothing
  97. End Sub
  98. End Class
  99. '*********************************************************
  100. '*********************************************************
  101. ' 目的:    BLOG信息类
  102. ' 输入:    无
  103. ' 返回:    无
  104. '*********************************************************
  105. Class TAtomFeed
  106. Public Property Get Node
  107. Set Node=objFeedNode
  108. End Property
  109. 'Public atomAuthor
  110. 'Public atomCategory
  111. 'Public atomContributor
  112. 'Public atomGenerator
  113. 'Public atomIcon
  114. 'Public atomId
  115. 'Public atomLink
  116. 'Public atomLogo
  117. 'Public atomRights
  118. 'Public atomSubtitle
  119. 'Public atomTitle
  120. 'Public atomUpdated
  121. Private objXMLdoc
  122. Private objFeedNode
  123. Private Function CommomAppendNode(strElement,strText,strType)
  124. Dim objSingleNode
  125. Dim objNodeText
  126. Dim objNodeCdata
  127. Set objSingleNode = objXMLdoc.createNode("element",strElement,"")
  128. If strType="" Then
  129. Set objNodeText=objXMLdoc.createNode("text", "", "")
  130. objNodeText.NodeValue=strText
  131. objSingleNode.AppendChild(objNodeText)
  132. ElseIf strType="text" Then
  133. objSingleNode.setAttribute "type",strType
  134. Set objNodeText=objXMLdoc.createNode("text", "", "")
  135. objNodeText.NodeValue=strText
  136. objSingleNode.AppendChild(objNodeText)
  137. ElseIf strType="html" Then
  138. objSingleNode.setAttribute "type",strType
  139. Set objNodeCdata=objXMLdoc.createNode("cdatasection", "", "")
  140. objNodeCdata.NodeValue=strText
  141. objSingleNode.AppendChild(objNodeCdata)
  142. ElseIf strType="xhtml" Then
  143. objSingleNode.setAttribute "type",strType
  144. Set objNodeText=objXMLdoc.createNode("text", "", "")
  145. objNodeText.NodeValue=strText
  146. objSingleNode.AppendChild(objNodeText)
  147. End If
  148. Set CommomAppendNode=objSingleNode
  149. Set objSingleNode = Nothing
  150. End Function
  151. Public Property Let atomCategory(strCategory)
  152. objFeedNode.AppendChild(CommomAppendNode("category",strCategory,""))
  153. End Property
  154. Public Property Let atomIcon(strIcon)
  155. objFeedNode.AppendChild(CommomAppendNode("icon",strIcon,""))
  156. End Property
  157. Public Property Let atomId(strId)
  158. objFeedNode.AppendChild(CommomAppendNode("id",strId,""))
  159. End Property
  160. Public Property Let atomLogo(strLogo)
  161. objFeedNode.AppendChild(CommomAppendNode("logo",strLogo,""))
  162. End Property
  163. Public Property Let atomRights(strRights)
  164. objFeedNode.AppendChild(CommomAppendNode("rights",strRights,"text"))
  165. End Property
  166. Public Property Let atomSubtitle(strSubtitle)
  167. objFeedNode.AppendChild(CommomAppendNode("subtitle",strSubtitle,"html"))
  168. End Property
  169. Public Property Let atomTitle(strTitle)
  170. objFeedNode.AppendChild(CommomAppendNode("title",strTitle,"html"))
  171. End Property
  172. Public Property Let atomUpdated(strUpdated)
  173. objFeedNode.AppendChild(CommomAppendNode("updated",strUpdated,""))
  174. End Property
  175. Public Function atomPerson(strPerson,strName,strEmail,strUrl)
  176. Dim objSingleNode
  177. Dim objNodeText
  178. Dim objAuthorNameNode
  179. Dim objAuthorUrlNode
  180. Dim objAuthorEmailNode
  181. Set objSingleNode = objXMLdoc.createNode("element",strPerson,"")
  182. If strName<>"" Then
  183. Set objAuthorNameNode = objXMLdoc.createNode("element","name","")
  184. Set objNodeText=objXMLdoc.createNode("text", "", "")
  185. objNodeText.NodeValue=strName
  186. objAuthorNameNode.AppendChild(objNodeText)
  187. objSingleNode.AppendChild(objAuthorNameNode)
  188. Set objNodeText = Nothing
  189. End If
  190. If strUrl<>"" Then
  191. Set objAuthorUrlNode = objXMLdoc.createNode("element","uri","")
  192. Set objNodeText=objXMLdoc.createNode("text", "", "")
  193. objNodeText.NodeValue=strUrl
  194. objAuthorUrlNode.AppendChild(objNodeText)
  195. objSingleNode.AppendChild(objAuthorUrlNode)
  196. Set objNodeText = Nothing
  197. End If
  198. If strEmail<>"" Then
  199. Set objAuthorEmailNode = objXMLdoc.createNode("element","email","")
  200. Set objNodeText=objXMLdoc.createNode("text", "", "")
  201. objNodeText.NodeValue=strEmail
  202. objAuthorEmailNode.AppendChild(objNodeText)
  203. objSingleNode.AppendChild(objAuthorEmailNode)
  204. Set objNodeText = Nothing
  205. End If
  206. objFeedNode.AppendChild(objSingleNode)
  207. Set objSingleNode = Nothing
  208. End Function
  209. Public Function atomLink(strRel,strType,strHref)
  210. Dim objSingleNode
  211. Dim objNodeText
  212. Set objSingleNode = objXMLdoc.createNode("element","link","")
  213. objSingleNode.setAttribute "rel",strRel
  214. objSingleNode.setAttribute "type",strType
  215. objSingleNode.setAttribute "href",strHref
  216. objFeedNode.AppendChild(objSingleNode)
  217. Set objSingleNode = Nothing
  218. End Function
  219. Public Function atomGenerator(strGenerator,strUri,strVersion)
  220. Dim objSingleNode
  221. Dim objNodeText
  222. Set objSingleNode = objXMLdoc.createNode("element","generator","")
  223. Set objNodeText=objXMLdoc.createNode("text", "", "")
  224. objNodeText.NodeValue=strGenerator
  225. objSingleNode.setAttribute "uri",strUri
  226. objSingleNode.setAttribute "version",strVersion
  227. objSingleNode.AppendChild(objNodeText)
  228. objFeedNode.AppendChild(objSingleNode)
  229. Set objSingleNode = Nothing
  230. Set objNodeText = Nothing
  231. End Function
  232. Private Sub Class_Initialize()
  233. Set objXMLdoc =Server.CreateObject("Microsoft.XMLDOM")
  234. Set objFeedNode = objXMLdoc.createElement("feed")
  235. End Sub
  236. Private Sub Class_Terminate()
  237. Set objXMLdoc = Nothing
  238. Set objFeedNode = Nothing
  239. End Sub
  240. End Class
  241. '*********************************************************
  242. '*********************************************************
  243. ' 目的:    日志类
  244. ' 输入:    无
  245. ' 返回:    无
  246. '*********************************************************
  247. Class TAtomEntry
  248. Public Property Get Node
  249. Set Node=objEntryNode
  250. End Property
  251. 'Public atomAuthor
  252. 'Public atomCategory
  253. 'Public atomContributor
  254. 'Public atomLink
  255. 'Public atomTitle
  256. 'Public atomUpdated
  257. 'Public atomPublished
  258. 'Public atomContent
  259. 'Public atomSummary
  260. 'Public atomId
  261. 'Public atomRights
  262. Private objXMLdoc
  263. Private objEntryNode
  264. Private Function CommomAppendNode(strElement,strText,strType)
  265. Dim objSingleNode
  266. Dim objNodeText
  267. Dim objNodeCdata
  268. Set objSingleNode = objXMLdoc.createNode("element",strElement,"")
  269. If strType="" Then
  270. Set objNodeText=objXMLdoc.createNode("text", "", "")
  271. objNodeText.NodeValue=strText
  272. objSingleNode.AppendChild(objNodeText)
  273. ElseIf strType="text" Then
  274. objSingleNode.setAttribute "type",strType
  275. Set objNodeText=objXMLdoc.createNode("text", "", "")
  276. objNodeText.NodeValue=strText
  277. objSingleNode.AppendChild(objNodeText)
  278. ElseIf strType="html" Then
  279. objSingleNode.setAttribute "type",strType
  280. Set objNodeCdata=objXMLdoc.createNode("cdatasection", "", "")
  281. objNodeCdata.NodeValue=strText
  282. objSingleNode.AppendChild(objNodeCdata)
  283. ElseIf strType="xhtml" Then
  284. objSingleNode.setAttribute "type",strType
  285. Set objNodeText=objXMLdoc.createNode("text", "", "")
  286. objNodeText.NodeValue=strText
  287. objSingleNode.AppendChild(objNodeText)
  288. End If
  289. Set CommomAppendNode=objSingleNode
  290. Set objSingleNode = Nothing
  291. End Function
  292. Public Function atomContent(strContent,strType)
  293. objEntryNode.AppendChild(CommomAppendNode("content",strContent,strType))
  294. End Function
  295. Public Property Let atomSummary(strSummary)
  296. objEntryNode.AppendChild(CommomAppendNode("summary",strSummary,"html"))
  297. End Property
  298. Public Property Let atomRights(strRights)
  299. objEntryNode.AppendChild(CommomAppendNode("rights",strRights,""))
  300. End Property
  301. Public Property Let atomId(strID)
  302. objEntryNode.AppendChild(CommomAppendNode("id",strID,""))
  303. End Property
  304. Public Property Let atomUpdated(dtmUpdated)
  305. objEntryNode.AppendChild(CommomAppendNode("updated",dtmUpdated,""))
  306. End Property
  307. Public Property Let atomPublished(dtmPublished)
  308. objEntryNode.AppendChild(CommomAppendNode("published",dtmPublished,""))
  309. End Property
  310. Public Property Let atomTitle(strTitle)
  311. objEntryNode.AppendChild(CommomAppendNode("title",strTitle,"html"))
  312. End Property
  313. Public Function atomCategory(strTerm,strScheme,strLabel)
  314. Dim objSingleNode
  315. Set objSingleNode = objXMLdoc.createNode("element","category","")
  316. objSingleNode.setAttribute "term",strTerm
  317. objSingleNode.setAttribute "scheme",strScheme
  318. objSingleNode.setAttribute "label",strLabel
  319. objEntryNode.AppendChild(objSingleNode)
  320. Set objSingleNode = Nothing
  321. End Function
  322. Public Function atomPerson(strPerson,strName,strEmail,strUrl)
  323. Dim objSingleNode
  324. Dim objNodeText
  325. Dim objAuthorNameNode
  326. Dim objAuthorUrlNode
  327. Dim objAuthorEmailNode
  328. Set objSingleNode = objXMLdoc.createNode("element",strPerson,"")
  329. If strName<>"" Then
  330. Set objAuthorNameNode = objXMLdoc.createNode("element","name","")
  331. Set objNodeText=objXMLdoc.createNode("text", "", "")
  332. objNodeText.NodeValue=strName
  333. objAuthorNameNode.AppendChild(objNodeText)
  334. objSingleNode.AppendChild(objAuthorNameNode)
  335. Set objNodeText = Nothing
  336. End If
  337. If strUrl<>"" Then
  338. Set objAuthorUrlNode = objXMLdoc.createNode("element","uri","")
  339. Set objNodeText=objXMLdoc.createNode("text", "", "")
  340. objNodeText.NodeValue=strUrl
  341. objAuthorUrlNode.AppendChild(objNodeText)
  342. objSingleNode.AppendChild(objAuthorUrlNode)
  343. Set objNodeText = Nothing
  344. End If
  345. If strEmail<>"" Then
  346. Set objAuthorEmailNode = objXMLdoc.createNode("element","email","")
  347. Set objNodeText=objXMLdoc.createNode("text", "", "")
  348. objNodeText.NodeValue=strEmail
  349. objAuthorEmailNode.AppendChild(objNodeText)
  350. objSingleNode.AppendChild(objAuthorEmailNode)
  351. Set objNodeText = Nothing
  352. End If
  353. objEntryNode.AppendChild(objSingleNode)
  354. Set objSingleNode = Nothing
  355. End Function
  356. Public Function atomLink(strRel,strType,strHref)
  357. Dim objSingleNode
  358. Dim objNodeText
  359. Set objSingleNode = objXMLdoc.createNode("element","link","")
  360. objSingleNode.setAttribute "rel",strRel
  361. objSingleNode.setAttribute "type",strType
  362. objSingleNode.setAttribute "href",strHref
  363. objEntryNode.AppendChild(objSingleNode)
  364. Set objSingleNode = Nothing
  365. End Function
  366. Public Property Let atomTag(strTag)
  367. objEntryNode.AppendChild(CommomAppendNode("tag",strTag,""))
  368. End Property
  369. Public Function GetComment(objCommentFeed)
  370. objEntryNode.appendChild(objCommentFeed)
  371. End Function
  372. Private Sub Class_Initialize()
  373. Set objXMLdoc =Server.CreateObject("Microsoft.XMLDOM")
  374. Set objEntryNode = objXMLdoc.createElement("entry")
  375. End Sub
  376. Private Sub Class_Terminate()
  377. Set objXMLdoc = Nothing
  378. Set objEntryNode = Nothing
  379. End Sub
  380. End Class
  381. '*********************************************************
  382. '*********************************************************
  383. ' 目的:    评论类
  384. ' 输入:    无
  385. ' 返回:    无
  386. '*********************************************************
  387. Class TAtomComment
  388. Public Property Get Node
  389. Set Node=objCommentNode
  390. End Property
  391. 'Public atomAuthor
  392. 'Public atomPublished
  393. 'Public atomContent
  394. Private objXMLdoc
  395. Private objCommentNode
  396. Private Function CommomAppendNode(strElement,strText,strType)
  397. Dim objSingleNode
  398. Dim objNodeText
  399. Dim objNodeCdata
  400. Set objSingleNode = objXMLdoc.createNode("element",strElement,"")
  401. If strType="" Then
  402. Set objNodeText=objXMLdoc.createNode("text", "", "")
  403. objNodeText.NodeValue=strText
  404. objSingleNode.AppendChild(objNodeText)
  405. ElseIf strType="text" Then
  406. objSingleNode.setAttribute "type",strType
  407. Set objNodeText=objXMLdoc.createNode("text", "", "")
  408. objNodeText.NodeValue=strText
  409. objSingleNode.AppendChild(objNodeText)
  410. ElseIf strType="html" Then
  411. objSingleNode.setAttribute "type",strType
  412. Set objNodeCdata=objXMLdoc.createNode("cdatasection", "", "")
  413. objNodeCdata.NodeValue=strText
  414. objSingleNode.AppendChild(objNodeCdata)
  415. ElseIf strType="xhtml" Then
  416. objSingleNode.setAttribute "type",strType
  417. Set objNodeText=objXMLdoc.createNode("text", "", "")
  418. objNodeText.NodeValue=strText
  419. objSingleNode.AppendChild(objNodeText)
  420. End If
  421. Set CommomAppendNode=objSingleNode
  422. Set objSingleNode = Nothing
  423. End Function
  424. Public Property Let atomTitle(strTitle)
  425. objCommentNode.AppendChild(CommomAppendNode("title",strTitle,"html"))
  426. End Property
  427. Public Function atomContent(strContent,strType)
  428. objCommentNode.AppendChild(CommomAppendNode("content",strContent,strType))
  429. End Function
  430. Public Property Let atomPublished(dtmPublished)
  431. objCommentNode.AppendChild(CommomAppendNode("published",dtmPublished,""))
  432. End Property
  433. Public Function atomPerson(strPerson,strName,strEmail,strUrl)
  434. Dim objSingleNode
  435. Dim objNodeText
  436. Dim objAuthorNameNode
  437. Dim objAuthorUrlNode
  438. Dim objAuthorEmailNode
  439. Set objSingleNode = objXMLdoc.createNode("element",strPerson,"")
  440. If strName<>"" Then
  441. Set objAuthorNameNode = objXMLdoc.createNode("element","name","")
  442. Set objNodeText=objXMLdoc.createNode("text", "", "")
  443. objNodeText.NodeValue=strName
  444. objAuthorNameNode.AppendChild(objNodeText)
  445. objSingleNode.AppendChild(objAuthorNameNode)
  446. Set objNodeText = Nothing
  447. End If
  448. If strUrl<>"" Then
  449. Set objAuthorUrlNode = objXMLdoc.createNode("element","uri","")
  450. Set objNodeText=objXMLdoc.createNode("text", "", "")
  451. objNodeText.NodeValue=strUrl
  452. objAuthorUrlNode.AppendChild(objNodeText)
  453. objSingleNode.AppendChild(objAuthorUrlNode)
  454. Set objNodeText = Nothing
  455. End If
  456. If strEmail<>"" Then
  457. Set objAuthorEmailNode = objXMLdoc.createNode("element","email","")
  458. Set objNodeText=objXMLdoc.createNode("text", "", "")
  459. objNodeText.NodeValue=strEmail
  460. objAuthorEmailNode.AppendChild(objNodeText)
  461. objSingleNode.AppendChild(objAuthorEmailNode)
  462. Set objNodeText = Nothing
  463. End If
  464. objCommentNode.AppendChild(objSingleNode)
  465. Set objSingleNode = Nothing
  466. End Function
  467. Private Sub Class_Initialize()
  468. Set objXMLdoc =Server.CreateObject("Microsoft.XMLDOM")
  469. Set objCommentNode = objXMLdoc.createElement("comment")
  470. End Sub
  471. Private Sub Class_Terminate()
  472. Set objXMLdoc = Nothing
  473. Set objCommentNode = Nothing
  474. End Sub
  475. End Class
  476. '*********************************************************
  477. '*********************************************************
  478. ' 目的:    评论类
  479. ' 输入:    无
  480. ' 返回:    无
  481. '*********************************************************
  482. Class TAtomTrackBack
  483. Public Property Get Node
  484. Set Node=objTrackBackNode
  485. End Property
  486. 'Public atomAuthor
  487. 'Public atomPublished
  488. 'Public atomContent
  489. Private objXMLdoc
  490. Private objTrackBackNode
  491. Private Function CommomAppendNode(strElement,strText,strType)
  492. Dim objSingleNode
  493. Dim objNodeText
  494. Dim objNodeCdata
  495. Set objSingleNode = objXMLdoc.createNode("element",strElement,"")
  496. If strType="" Then
  497. Set objNodeText=objXMLdoc.createNode("text", "", "")
  498. objNodeText.NodeValue=strText
  499. objSingleNode.AppendChild(objNodeText)
  500. ElseIf strType="text" Then
  501. objSingleNode.setAttribute "type",strType
  502. Set objNodeText=objXMLdoc.createNode("text", "", "")
  503. objNodeText.NodeValue=strText
  504. objSingleNode.AppendChild(objNodeText)
  505. ElseIf strType="html" Then
  506. objSingleNode.setAttribute "type",strType
  507. Set objNodeCdata=objXMLdoc.createNode("cdatasection", "", "")
  508. objNodeCdata.NodeValue=strText
  509. objSingleNode.AppendChild(objNodeCdata)
  510. ElseIf strType="xhtml" Then
  511. objSingleNode.setAttribute "type",strType
  512. Set objNodeText=objXMLdoc.createNode("text", "", "")
  513. objNodeText.NodeValue=strText
  514. objSingleNode.AppendChild(objNodeText)
  515. End If
  516. Set CommomAppendNode=objSingleNode
  517. Set objSingleNode = Nothing
  518. End Function
  519. Public Property Let atomTitle(strTitle)
  520. objTrackBackNode.AppendChild(CommomAppendNode("title",strTitle,"html"))
  521. End Property
  522. Public Function atomContent(strContent,strType)
  523. objTrackBackNode.AppendChild(CommomAppendNode("content",strContent,strType))
  524. End Function
  525. Public Property Let atomPublished(dtmPublished)
  526. objTrackBackNode.AppendChild(CommomAppendNode("published",dtmPublished,""))
  527. End Property
  528. Public Function atomLink(strRel,strType,strHref)
  529. Dim objSingleNode
  530. Dim objNodeText
  531. Set objSingleNode = objXMLdoc.createNode("element","link","")
  532. objSingleNode.setAttribute "rel",strRel
  533. objSingleNode.setAttribute "type",strType
  534. objSingleNode.setAttribute "href",strHref
  535. objTrackBackNode.AppendChild(objSingleNode)
  536. Set objSingleNode = Nothing
  537. End Function
  538. Private Sub Class_Initialize()
  539. Set objXMLdoc =Server.CreateObject("Microsoft.XMLDOM")
  540. Set objTrackBackNode = objXMLdoc.createElement("trackback")
  541. End Sub
  542. Private Sub Class_Terminate()
  543. Set objXMLdoc = Nothing
  544. Set objTrackBackNode = Nothing
  545. End Sub
  546. End Class
  547. '*********************************************************
  548. </Script>