vb读取用word转换成的xml里的数据 - VB / 基础类
Private Sub Command1_Click()
Dim MyString() As String
Open "a.xml" For Binary As #1 ' 打开刚创建的文件。
ReDim MyString(LOF(1) - 1)
Put #1, , MyRecord ' 读入所有字符到变量中。
Close #1 ' 关闭文件。
Dim i As Integer
Dim s As Boolean
Dim NeiRong As String
For i = 1 To UBound(MyString())
If MyString(i) = ">" Then
s = True '开始连接字符
ElseIf MyString(i) = " <" Then
s = False
End If
If s = True Then
NeiRong = NeiRong + MyString(i)
End If
Next i
End Sub
总是显示 MyRecord是空置,要怎么解决,谢谢
添加MsXML引用
使用DOMDocument
http://download.csdn.net/source/1627134
相关问答:
txt 和XML 格式相应
不借助DataSet
导入读取TXT文件
然后直接写入XML(同一文件,不同数据,递增原数据没有被覆盖情况下增加数据.)
教个要点或最好是有个代码提示的
过路好汉 帮个忙撒^^
不会,帮楼主 ......
本人使用的是VB6.0版本
假设有一个对象A,A内有类型为B的对象属性。现在的问题是,需要添加若干个B对象作为A对象的属性。如,
A.B1,A.B2,...
但具体添加多少个B对象作为A对象的属性则视具体情况不同而不同 ......
<?xml version="1.0" encoding="utf-8" ?>
- <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical&q ......
我在编写一个wince5.0的程序,想实现把PDA上的一个LIST <STRING>类型的数据序列化为XML,然后在PC上的一个webservice拿到这个XML,转化为Dataset,更新PC上的数据库,我想问怎么把XML传给webservice的呢?
......
我想把word另存为xml之后,用vb读取这个xml的内容,请问如何实现?
dim f as integer
dim b() as byte
dim s as string
dim L as long
f=freefile()
open "abc.xml" for binary access read as #f
......