+------------------------------------------------------------------------------------------------------+
敝帚自珍:ASP读取XML类XmlReader [2005-10-24] Xmercy 发表在 Develop
| 这个类很简单,只提供读取XML文档的方法,但可以根据自己需要自行扩展 <% Class XmlReader
Private Xml
Public Sub Load(ByVal Path) Xml.Load(Server.MapPath(Path)) End Sub
Public Function SelectSingleNode(ByVal XPath) Set SelectSingleNode = Xml.SelectSingleNode(XPath) End Function
Public Function SelectNodes(ByVal XPath) Set SelectNodes = Xml.SelectNodes(XPath) End Function Private Sub Class_initialize() Set Xml = Server.CreateObject("Microsoft.XMLDOM") Xml.async = False 'Xml.setProperty "ServerHTTPRequest", True End Sub Private Sub Class_Terminate() Set Xml = Nothing End Sub
End Class %> | |
+------------------------------------------------------------------------------------------------------+ |