'xmltotable示例
Dim myxml1 As New mydll("d:\iceou.xml")
myxml1.XMLFile_Format("d:\iceou.xml")
Dim myxml As New mydll("d:\iceou.xml")
Dim nt As New Xml.NameTable
Dim nsmgr As New Xml.XmlNamespaceManager(nt)
nsmgr.AddNamespace("SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/")
nsmgr.AddNamespace("SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/")
nsmgr.AddNamespace("xsi", "http://www.w3.org/2001/XMLSchema-instance")
nsmgr.AddNamespace("xsd", "http://www.w3.org/2001/XMLSchema")
nsmgr.AddNamespace("m", "http://webservice.clini.org/")
DataGridView1.DataSource = myxml.xmlToTable("m:getInHospType", , nsmgr)
‘xmltotree示例
Dim nt As New Xml.NameTable
Dim m_xmldll As New mydll("d:\test1.xml")
Dim nsmgr As New Xml.XmlNamespaceManager(nt)
nsmgr.AddNamespace("SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/")
nsmgr.AddNamespace("m", "http://webservice.clini.org/")
'm_xmldll.xmltotreeview("arg0", TreeView1)
'm_xmldll.m_treeview = TreeView1
m_xmldll.xmlToTreeview("SOAP-ENV:Envelope", TreeView1, "", nsmgr, ImageList1)下载:
以上已做了优化和变动,请参看另一篇文章
点击打开链接
这篇文档介绍了XMLDLL的使用,提供了xmltotable和xmltotree两个示例,展示了如何将XML数据转换为表格并进行解析。示例中涉及了Xml.NamespaceManager的使用,用于处理XML命名空间。

被折叠的 条评论
为什么被折叠?



