2005/10/24 | 敝帚自珍:ASP读取XML类XmlReader
类别(Develop) | 评论(1) | 阅读(206) | 发表于 19:28
这个类很简单,只提供读取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
%>
0

评论Comments

日志分类
首页[66]
Develop[14]
Plus[3]
Melody[7]
Essay[38]
Archive[4]