一段XML 我怎么获取他的数据 VB6.0<?xml version = "1.0" encoding = "GB2312" standalone = "no"?>
<data>
<book cost="56">
<name>Dreamweaver</name>
</book>
<book cost="62">
<name>Flash</name>
</book>
<book cost="48">
<name>Firweorks</name>
</book>
</data>各位大侠帮帮忙啊!
<data>
<book cost="56">
<name>Dreamweaver</name>
</book>
<book cost="62">
<name>Flash</name>
</book>
<book cost="48">
<name>Firweorks</name>
</book>
</data>各位大侠帮帮忙啊!
解决方案 »
- 请问什么api能判断系统是32位还是64位?
- 这个代码的问题
- Set conn = CreateObject("ADODB.Connection") 有几种方法?
- 求优化界面用控件……分不多,谢
- VB串口编程的问题?在线等待
- 插入记录以后,怎么样才能显示出来呢?
- 这个图片的点击的语句怎么写
- 请教:如何使用ADO连接FoxBase数据库(除ODBC外),连接字符串怎么写???
- 看看这段代码,为什么可以把EXCEL 2000中数据倒入ACCESS97,但是不能倒入ACCESS 2000?该如何处理呢?
- 想u盘插入电脑后自动备案U盘所有文件和文件夹到电脑
- VC代码转成VB
- 为什么把本机word文件存到数据库后,再打开就成成乱码了.
类似
Dim oSchemaCache As New XMLSchemaCache40
Dim oDOMNode As DOMDocument40
Dim nsTarget As StringnsTarget = ""
oSchemaCache.Add nsTarget, "po.xsd"
Set oDOMNode = oSchemaCache.get(nsTarget)
<title>read xml</title>
<body>
<%
dim node,i,nodecount
set Doc = CreateObject("Microsoft.XMLDOM")
Doc.async = false
Doc.load("http://127.0.0.1/in2.xml")
set root = Doc.documentElement
set nodeLis = root.childNodes
nodeCount = nodeLis.length
For i=1 to nodeCount
set node = nodeLis.nextNode()
set cost = node.attributes.getNamedItem("cost")
%>
第 <%=i%> 条记录:
<table border="1">
<tr>
<td width="17">书名</td>
<td width="48">出版社</td>
<td width="32">价格</td>
</tr>
<tr>
<td>
<%=node.selectSingleNode("name").text%>
</td>
<td> </td>
<td>
<%= cost.text%>
</td>
</tr>
</table>
<%
Next
%>
</body>
</html>ASP这样可以读取 在VB里面怎么样实现呢??
StreamReader fReader = New StreamReader(filepath\filename,System.Text.Encoding.GetEncoding("GB2312"))
fdoc.Load(fReader)
Dim nodeList As XmlNodeList
nodeList = fdoc.SelectNodes(aXPath)
....
...
..