VB & XML 相关文章集锦
最近公司要开展自动化测试,想借助XML读写信息,于是回来查了些资料,以便自己学习,但愿看完之后能有收获......
一.XML的简单读取与写入
已知有一个XML文件(bookstore.xml)如下:
<?xml version="1.0" encoding="gb2312"?>
<bookstore>
<book genre="fantasy" ISBN="2-3631-4">
<title>Oberon's Legacy</title>
<author>Corets, Eva</author>
<price>5.95</price>
</book>
</bookstore>
1、往<bookstore>节点中插入一个<book>节点:
XmlDocument xmlDoc=new XmlDocument();
xmlDoc.Load("bookstore.xml");
XmlNode root=xmlDoc.SelectSingleNode("bookstore");//查找<bookstore>
XmlElement xe1=xmlDoc.CreateElement("book");//创建一个<book>节点
xe1.SetAttribute("genre","李赞红");//设置该节点genre属性
xe1.SetAttribute("ISBN","2-3631-4");//设置该节点ISBN属性
XmlElement xesub1=xmlDoc.CreateElement("title");
xesub1.InnerText="CS从入门到精通";//设置文本节点
xe1.AppendChild(xesub1);//添加到<book>节点中
XmlElement xesub2=xmlDoc.CreateElement("author");
xesub2.InnerText="候捷";
xe1.AppendChild(xesub2);
XmlElement xesub3=xmlDoc.CreateElement("price");
xesub3.InnerText="58.3";
xe1.AppendChild(xesub3);
root.AppendChild(xe1);//添加到<bookstore>节点中
xmlDoc.Save("bookstore.xml");
//===============================================
结果为:
<?xml version="1.0" encoding="gb2312"?>
<bookstore>
<book genre="fantasy" ISBN="2-3631-4">
<title>Oberon's Legacy</title>
<author>Corets, Eva</author>
<price>5.95</price>
</book>
<book genre="李赞红" ISBN="2-3631-4">
<title>CS从入门到精通</title>
<author>候捷</author>
<price>58.3</price>
</book>
</bookstore>
2、修改节点:将genre属性值为“李赞红“的节点的genre值改为“update李赞红”,将该节点的子节点
<author>的文本修改为“亚胜”。
XmlNodeList nodeList=xmlDoc.SelectSingleNode("bookstore").ChildNodes;//获取bookstore节点的所
有子节点
foreach(XmlNode xn in nodeList)//遍历所有子节点
{
XmlElement xe=(XmlElement)xn;//将子节点类型转换为XmlElement类型
if(xe.GetAttribute("genre")=="李赞红")//如果genre属性值为“李赞红”
{
xe.SetAttribute("genre","update李赞红");//则修改该属性为“update李赞红”
XmlNodeList nls=xe.ChildNodes;//继续获取xe子节点的所有子节点
foreach(XmlNode xn1 in nls)//遍历
{
XmlElement xe2=(XmlElement)xn1;//转换类型
if(xe2.Name=="author")//如果找到
{
xe2.InnerText="亚胜";//则修改
break;//找到退出来就可以了
}
}
break;
}
}
xmlDoc.Save("bookstore.xml");//保存。
//==================================================
最后结果为:
<?xml version="1.0" encoding="gb2312"?>
<bookstore>
<book genre="fantasy" ISBN="2-3631-4">
<title>Oberon's Legacy</title>
<author>Corets, Eva</author>
<price>5.95</price>
</book>
<book genre="update李赞红" ISBN="2-3631-4">
<title>CS从入门到精通</title>
<author>亚胜</author>
<price>58.3</price>
</book>
</bookstore>
3、删除 <book genre="fantasy" ISBN="2-3631-4">节点的genre属性,删除 <book genre="update李赞红
" ISBN="2-3631-4">节点。
XmlNodeList xnl=xmlDoc.SelectSingleNode("bookstore").ChildNodes;
foreach(XmlNode xn in xnl)
{
XmlElement xe=(XmlElement)xn;
if(xe.GetAttribute("genre")=="fantasy")
{
xe.RemoveAttribute("genre");//删除genre属性
}
else if(xe.GetAttribute("genre")=="update李赞红")
{
xe.RemoveAll();//删除该节点的全部内容
}
}
xmlDoc.Save("bookstore.xml");
//===========================================
最后结果为:
<?xml version="1.0" encoding="gb2312"?>
<bookstore>
<book ISBN="2-3631-4">
<title>Oberon's Legacy</title>
<author>Corets, Eva</author>
<price>5.95</price>
</book>
<book>
</book>
</bookstore>
4、显示所有数据。
XmlNode xn=xmlDoc.SelectSingleNode("bookstore");
XmlNodeList xnl=xn.ChildNodes;
foreach(XmlNode xnf in xnl)
{
XmlElement xe=(XmlElement)xnf;
Console.WriteLine(xe.GetAttribute("genre"));//显示属性值
Console.WriteLine(xe.GetAttribute("ISBN"));
XmlNodeList xnf1=xe.ChildNodes;
foreach(XmlNode xn2 in xnf1)
{
Console.WriteLine(xn2.InnerText);//显示子节点点文本
}
}
二.VB读取XML的函数
Function commGetContentFromXml(ByVal strName, ByVal strXMLPath) As String
Dim objXmlDoc As Object
Dim CParamList
Dim CName As String
Dim i As Integer
commGetContentFromXml = ""
strName = Trim(strName)
strXMLPath = Trim(strXMLPath)
On Error GoTo readXmlFileError
Set objXmlDoc = CreateObject("Microsoft.XMLDOM")
objXmlDoc.Load strXMLPath
Set CParamList = objXmlDoc.getElementsByTagName("context-param")
For i = 0 To CParamList.length - 1
CName = CParamList.Item(i).selectSingleNode("param-name").Text
If CName = strName Then
commGetContentFromXml = CParamList.Item(i).selectSingleNode("param-value").Text
Exit For
End If
Next i
Set objXmlDoc = Nothing
Set CParamList = Nothing
Exit Function
readXmlFileError:
Set objXmlDoc = Nothing
Set CParamList = Nothing
Exit Function
End Function
三.VB和VB.NET中的XML操作
概述:这篇文章为计划将他们的应用程序更新到Visual Basic.NET的微软Visual Basic 开发用户提供一些
关于XML的建议。主要包括Visual Basic 6和Visual Basic.NET对XML操作的不同之处,以及Visual
Basic.NET关于这方面新增工具的应用。 概述:这篇文章为计划将他们的应用程序更新到Visual
Basic.NET的微软Visual Basic 开发用户提供一些关于XML的建议。主要包括Visual Basic 6和Visual
Basic.NET对XML操作的不同之处,以及Visual Basic.NET关于这方面新增工具的应用。
扩展标记语言XML是一种简单的数据存储语言,使用一系列简单的标记描述数据,而这些标记可以用方
便的方式建立。XML的简单使其易于在任何应用程序中读写数据,这使XML很快成为数据交换的唯一公共语
言,可以说,“没有XML,就没有编程的未来”。
XML主要应用在以下几个方面:
1. 设计标记语言,如CML,MathML, WML等。
2. 数据交换和数据整合,这是XML最激动人心的应用。
3. 媒体无关的数据发布
4. 智能代理和本地计算
5. 精确搜索
6. 文件保值
XML的语法非常的简单,XML文档由节点组成,使用打开和关闭节点描述标记,在格式上与HTML标记非
常相似,它们之间最大的不同是:XML中可以自由定义标记名。比如下面的标记就描述了一个主页地址:
<web>http://hongwanfu.126.com</web>
注意,XML不用声明标记名就可以使用,而且,开始和结束标记必须相同,XML是识别大小写的,所以
标记的大小写也必须相同。
节点标记中可以包含属性,比如:
<web type=”Homepage”>http://hongwanfu.126.com</web>
代码中Web节点包含属性Type,其值为Homepage.
如果不愿意在节点中包含一个值,那么可以不需要结束标记,可以用在开始标记的后面加一个斜线来
结束节点,在下面的例子中,Web标记的属性就存储了一个电话号码,所以就不需要一个结束标记:
<web type=”Homepage” url=”http://hongwanfu.126.com” />
以上只是对XML文档的简单描述,如何使用文档中包含的信息,XML标准体系中有其他的配套标准。
XSL(可扩展样式表语言)是对CSS的一种扩展,功能比CSS强大得多。XML链接是在HTML链接的功能之上加
以扩展,可以支持更为复杂的链接,通过XML链接,不仅可以在XML文件之间建立链接,还可以建立其他类
型数据之间的链接,其规范分为三个部分:XLink语言,XPointer语言和XML Base.
XML标准体系中还有其他很多技术,比如针对DTD的不足而提出的XML Schema,对XML文档进行结构话处
理的DOM等,由于篇幅的关系,在这就不一一列举,不熟悉的请参考有关书籍。
好了,现在让我们开始进入正题——对XML的操作。首先,请保证您的电脑中有最新版本的MSXML,微
软XML核心服务(MSXML)版本4.0提供了从Visual Basic6.0加载和存储XML文档的工具。若没有,请到
http://msdn.microsoft.com/xml/default.asp中下载最新版本的MSXML,并安装在计算机上。在Visual
Basic 6.0中使用Microsoft XML V4.0对象引用其他对象一样,首先在工程菜单中选择引用菜单项,选择
Microsoft V4.0,单击OK,一切完成后就现在就可以在VB应用程序中添加XML对象了。如图:
万事俱备,我们先用VB和MSXML的COM接口的DOM实现的一个例子来对XML操作进行初步的了解吧。
首先声明下面要用的几个对象的变量:
Dim tempdoc As DOMDocument
Dim tempnode As IXMLDOMNode
Dim tempelement As IXMLDOMElement
Dim tempattribute As IXMLDOMElement
Dim root As IXMLDOMElement
文档对象模型(DOM)使用了一系列相应的对象描述了XML文档的等级状态,DOMDocument类是一个描绘
XML文档的DOM结构的MSXML类。DOMDocument类仅仅提供了很少的几个有用的属性和方法,例如:Load方法
载入一个xml文件,loadxml方法将字符串作为xml数据添加到对象中。DOMDocument的xml属性返回文档的
xml描述,可以显示这些返回值看看这些文档究竟是什么样子,也可以将它存储为一个文件,DOMDocument
对象的documentElement属性表示文档数据的根结点,通常情况下操作XML文档都从这里开始。DOMDocument
提供了几种创建新节点的方法。CreateElement方法为文档创建一个新的元素节点,其他创建节点的方法有
createAttribute, createProcessingInstruction, 和 createTextNode,在这里就不一一介绍了。
IXMLDOMNode类描述了一个节点,该类提供了一系列用于搜索和操纵XML文档的属性和方法。
selectSingleNode 方法用于搜索指定节点的后代,用于搜索指定节点路径的语言称为XPATH,XPATH非常棘
手,本文就不详细说明其规范了。在IXMLDOMNode对象中,有许多有用的属性值:
attributes.节点属性集合
nodeName.节点的标记名
nodeTypeString.节点的类型
ownerDocument.返回DOMDocument对象包含的节点
text.表示节点包含的文本内容。如果该节点包含其他节点,那么text代表了所有节点的文本内容的组
合。
xml.给出了节点的xml内容,例如:"<Email>hongwanfu@yahoo.com</Email>".
ChildNodes集合包含了节点的子节点。要给节点增加一个子节点,首先必须给使用DOMDocument对象的
节点创建方法,然后将这个新建的节点加入到父节点的childNodes集合中。 ChildNodes集合包含了节点的
子节点。要给节点增加一个子节点,首先必须给使用DOMDocument对象的节点创建方法,然后将这个新建的
节点加入到父节点的childNodes集合中。
由于每个节点类型都有不同的访问方法和内容限制,有时候使用特定类型的节点要比使用通用
IXMLDOMNode 对象更容易。要做到这一点,需要使用 IXMLDOMElement 对象来处理 XML 数据元素和属性。
正如元素可以包含 XML 数据文件中的子元素、文本、注释、处理说明、CDATA 部分和实体引用一样,
IXMLDOMElement 对象也可以包含 IXMLDOMElement、IXMLDOMText、IXMLDOMComment、
IXMLDOMProcessingInstruction、IXMLDOMCDATASection 和 IXMLDOMEntityReference 对象。可以通过使
用 IXMLDOMElement 对象的 getAttribute 和 setAttribute 方法来访问属性;或者通过 IXMLDOMElement
对象的 attributes 属性,将属性作为 IXMLDOMNamedNodeMap 对象进行管理。有关使用这些方法和对象的
详细信息,请参阅 MSXML 4.0 SDK Help。
接下来我们要做的是生成一个XML DOMDocument 对象 :
Set tempdoc = New DOMDocument
生成根节点并把它设置为文件的根 :
Set root = tempdoc.createElement("Personal")
Set tempdoc.documentElement = root
生成孩子节点添加到根节点上去,并且为这个节点设置一个属性 :
Set tempnode = tempdoc.createNode(NODE_ELEMENT, "Web", "")
tempnode.Text = " http://hongwanfu.126.com "
root.appendChild tempnode
取得元素节点的接口,添加属性:
Set tempelement = tempnode
tempelement.setAttribute "Type", "Homepage"
最后,写XML文件:
Open "CreateXMLFile.xml" for output as #1
Print #1, root.XML
Close #1
下面就是上面程序生成的CreateXMLFile.xml文件的内容如图:
熟悉了如何用Visual Basic 6创建XML文件,接下来,我们将编写一个程序,使得程序开始运行时,程序从
XML文件中加载数据,在程序运行结束时,将程序中的现行值存入XML文件中。
首先,建立一个名叫Personal.xml的文件:
<?xml version="1.0" encoding="GB2312"?>
<个人信息>
<姓名>洪万福</姓名>
<性别>男</性别>
<出生日期>1983年x月x日</出生日期>
<地址>福建省厦门市集美大学水产学院新区270#</地址>
<邮编>361021</邮编>
<QQ>24948251</QQ>
<个人主页>http://hongwanfu.126.com</个人主页>
</个人信息>
其中,encoding="GB2312"是为了防止显示中文时出现乱码。
接着,进入Visual Basic 6,建立7个Label和7个TextBox, 具体如图:
随后,编写如下代码:
Option Explicit
Private p_AppPath As String
Private Sub Form_Load()
' 获得程序运行目录
p_AppPath = App.Path
If Right$(p_AppPath, 1) <> "" Then p_AppPath = p_AppPath & ""
' 加载值
LoadValues
End Sub
Private Sub Form_Unload(Cancel As Integer)
' 保存现有的值
SaveValues
End Sub
Private Sub LoadValues()
Dim xml_document As DOMDocument
Dim values_node As IXMLDOMNode
' 载入文件
Set xml_document = New DOMDocument
xml_document.Load p_AppPath & "Personal.xml"
If xml_document.documentElement Is Nothing Then
Exit Sub
End If
'寻找节点
Set values_node = xml_document.selectSingleNode("个人信息")
' 读取各个节点的值
txtName.Text = GetNodeValue(values_node, "姓名", "???")
txtSex.Text = GetNodeValue(values_node, "性别", "???")
txtBirthday.Text = GetNodeValue(values_node, "出生日期", "???")
txtAddress.Text = GetNodeValue(values_node, "地址", "???")
txtZip.Text = GetNodeValue(values_node, "邮编", "???")
txtQQ.Text = GetNodeValue(values_node, "QQ", "???")
txtHomepage.Text = GetNodeValue(values_node, "个人主页", "???")
End Sub
' 返回各个节点的值
Private Function GetNodeValue(ByVal start_at_node As IXMLDOMNode, ByVal node_name As String,
_
Optional ByVal default_value As String = "") As String
Dim value_node As IXMLDOMNode
Set value_node = start_at_node.selectSingleNode(".//" & node_name)
If value_node Is Nothing Then
GetNodeValue = default_value
Else
GetNodeValue = value_node.Text
End If
End Function
' 保存现有的值
Private Sub SaveValues()
Dim xml_document As DOMDocument
Dim values_node As IXMLDOMNode
' 建立XML文件
Set xml_document = New DOMDocument
Set values_node = xml_document.createElement("个人信息")
xml_document.appendChild values_node
CreateNode values_node, "姓名", txtName.Text
CreateNode values_node, "性别", txtSex.Text
CreateNode values_node, "出生日期", txtBirthday.Text
CreateNode values_node, "地址", txtAddress.Text
CreateNode values_node, "邮编", txtZip.Text
CreateNode values_node, "QQ", txtQQ.Text
CreateNode values_node, "个人主页", txtHomepage.Text
' 保存XML文件
xml_document.save p_AppPath & "Personal.xml"
End Sub
Private Sub CreateNode(ByVal parent As IXMLDOMNode, _
ByVal node_name As String, ByVal node_value As String)
Dim new_node As IXMLDOMNode
Set new_node = parent.ownerDocument.createElement(node_name)
new_node.Text = node_value
parent.appendChild new_node
End Sub
运行结果如下:
虽然,MSXML提供了从Visual Basic6.0加载和存储XML文档的工具,但是,对其的应用要求程序员对VB
和MSXML的COM接口有一定的认识,所以,并不是得到很广泛的应用。
Visual Basic.NET的出现大大改变了这个状况,Visual Basic.NET提供了使用XML、XSL以及其他XML工具
的完整工具,使用户很轻松就能实现XML的应用,甚至,在不用编写代码的情况下操作XML。
ADO.NET是Microsoft新推出的.NET框架中用于数据访问的组件,其最大的优点就是使用XML作为传送数
据的标准,只要有一个XML文本,就可以读入ADO.NET的组件中,然后ADO.NET再以XML格式传给数据库或者
其他组件。
可以使用DataSet对象的ReadXML方法将一个XML文件读入到DataSet中,这是一个重载的方法,有几种
语法格式,经常用到的如下所示:
ReadXML(FileName)
其中,FileName为XML文档的名字,现在将前面创建的XML文本“Personal.xml”读入到DataSet中。新
建一个项目,在窗体上创建一个Button和一个DataGrid控件,双击Button1输入以下代码:
Dim ds As New DataSet()
'读入XML文档
ds.ReadXml("personal.xml")
Dim tb As DataTable
Dim dv As DataView
tb = ds.Tables(0)
dv = New DataView(tb)
Me.DataGrid1.DataSource = dv
显示结果如图:
怎么样?和刚才比起来,代码量是不是少了很多,很容易就实现了XML文件的读取呢?
.NET框架提供了操作XML文档和数据的一组完整的类。XmlReader和XmlWriter对象以及这两个对象的派
生类提供了读取XML和可选验证XML的能力。XmlDocument和XMLSchema对象及其相关类代表了XML本身,而
XslTransform和XMPathNavigator类分别支持XSL转换(XSLT)和应XML路径语言(XPath)查询。
除了提供操作XML数据的外,XML标准还是.NET框 架中数据转换和序列化的基础。多数时候这些后台进
行,不过我们已经看到ADO.NET类型化数据集是使用XML架构表示的。
另外,ADO.NET数据集类对读写XML数据和架构提供直接支持,而且XmlDataDocument提供同步XML数据
和关系ADO.NET数据集的能力,这样就可以用XML和关系工具对数据的单个集合进行操作。
.NET框架公开了一个可用来直接对XML数据进行操作的类集。不过,如果需要使用关系操作(如排序、
过滤或检索相关行),数据集则提供了一个更简便的机制。此外,XML类不支持数据绑定,所以如果要向用
户显示数据,就必须使用数据集的XML方法。
幸运的是,将任何一个给定的数据集合作为XML层次结构或关系数据集相互并不排斥。
1.数据集支持的最直接的XML方法可能就是GetXml和GetXmlSchema了,这方法只将XML数据或XSD架构作
为一个字符串值返回。可以用以下代码来实现:
Dim xmlstr As String
xmlStr = Me.dsMasterl.GetXmlSchema()
Me.tbResult.Text = xmlStr
和
Dim xmlstr As String
xmlStr = Me.dsMasterl.GetXml
Me.tbResult.Text = xmlStr
2. 数据集的ReadXmlSchema方法可从XSD架构定义或从XML加载数据集架构定义。
ReadXmlSchema支持4个版本的方法。可以将流、识别文件名的字符串、TextReader或XmlReader对象传
递给方法。
ReadXmlSchema不加载任何数据,它只加载表、列和约束(键和关系)。如果数据集已经架构信息,新
表、列和约束将在必要时添加到现有架构中。如果正读取的架构中定义的对象与现有数据集架构冲突,那
么ReadXmlSchema方法将会引发一个异常。
Dim newDS As New System.Data.DataSet()
newDS.ReadXmlSchema("masterSchema.xsd")
Me.daCategories.Fill(newDS.Tables("Categories"))
Me.daproducts.Fill(newDS.Tables("Products"))
SetBindings(newDS)
3. 数据集的InferXmlSchema方法根据传递给它的XML数据的结构派生出数据集架构。
InferXmlSchema与上一节介绍的ReadXmlSchema方法的输入源相同。另外,InferXMLSchema方法接受表
示命名空间的字符串数组,这个空间在生成数据集架构时应被忽略。
Dim newDS As New System.Data.DataSet()
Dim nsStr()As string
newDS.InferXmlSchema("dataOnly.xml",nsStr))
Me.daCategories.Fill(newDS.Tables("Categories"))
Me.daProducts.Fill(newDS.Tables(Products"))
newDS.Relations.Add("CategoriesProducts", _
newDS.Tables("Categories").Columns("CategoryID"), _
newDS.Tables("Products").Columns("CategoryID"))
前两行代码声明了数据集和String数组变量,第3行将结果传递到InferXmlSchema方法中。接下来的代
码给新数据集添加并填充了新的数据关系,然后SetBindings函数将XML窗体控件绑定到数据集上。
4.WriteXmlSchema方法将数据集架构(包括表、列和约束)写到指定输出中。这个方法和其他XML方
法一样,都接受相同的输出参数。
Me.dsMaster1.WriteXmlSchema("testSchema.xsd")
Messagebox.Show("Finished","WriteXmlSchema")
5. 与ReadXml类似,数据集的WriteXml方法也可将XML数据或可选的数据集架构信息写到指定输出中。
Me.daCategories.Fill(Me.dsMaster1.Categories)
Me.daProducts.Fill(Me.dsMaster1.Products)
Me.dsMaster1.WriteXml("newData.xml", XmlWriteMode.IgnoreSchema)
MessageBox.Show("Finished", “WriteXml")
默认情况下,WriteXml方法生成XML,所生成的XML是一般结构来设置格式的,其中数据表的结构作为
复杂类型,数据列的结构作为复杂类型中的元素。这并不一定是所需要的输出结果。例如,如果要将数据
读回到数据集,只有存在架构时(而架构在很多情况下都是不很必要的开销)或者相关数据嵌套在XML层次
结构中时,ADO.NET才会创建正确的关系。在其他情况下,也许需要控制列是否以元素、必性或简单文本方
式写入,或者完全阻止某些列被写入。比如,在应用程序间互换数据就可能出会这种情况。
Me.daCategories.Fill(Me.dsMaster1.Categories)
Me.daProducts.Fill(Me.dsMaster1.Products)
Me.dsMaster1.Relations("CategoriesProducts").Nested = True
Me.dsMaster1.WriteXml("nestedData.xml",XmlWriteMode.IgnoreSchema)
MessageBox.Show("Finished","WriteXml Nested")
数据列的ColumnMapping(列映射)属性控制着WriteXML方法写入列的方式。ColumnMapping属性的可能
取值。 默认值Element将列作为表示数据表的复杂类型内的嵌套元素写入,同时,Attribute将列作为它的
必性之一写入。这两个值可以在任何给定的数据表内混用。Hidden值可防止列写入。SimpleContent将列作
为一个简单文本值写入,它不能与那些作为元素或属性写入的列混合,也不能在数据关系的Nested属性引
用一个将Nested属性设置为True的表时使用。
Me.daCategories.Fill(Me.dsMaster1.Categories)
with Me.dsMaster1.Categories
.Columns("CategoryID").ColumnMapping = MappingType.Attribute
.Columns("CategoryName").ColumnMapping = MappingType.Attribute
.Columns("dESCRIPTION").ColumnMapping = MappingType.Attribute
End with
Me.dsMaster1.WriteXml("attributes.xml", XmlWriteMode.IgnoreSchme)
MessageBox.Show("Finished", "Write Attributes")
6. 虽然关系数据有效,但有些时候使用XML提供的工具(如XSL(可扩展样式表语言)、XSLT、和
XPath)操作一组数据会更方便。
.NET框架的Xml数据文档(XML DataDocument)使之成为可能。Xml数据文档允许将XML结构的数据作为
数据集来操作。它不会创建一组新数据,但会创建一个引用所有或部分XML数据的数据集。因为只有一组数
据,在一个视图中所作的更改将会自动反映在另一个视图中。当然存储资源会被保存,因为只维护了数据
的一个副本。
根据数据的初始源的不同,可以基于数据集的架构和内容创建一个Xml数据文档,或基于Xml数据文档
的内容创建数据集。在任何一种情况下,对一个视图中存数据所作的更改将会映射到另一个视图中。
要创建基于现有数据集的Xml数据文档,可将数据集传递给XMLDataDocument构造函数:
myXDD = New XmlDataDocument(myDS)
如果在创建Xml数据文档之前,数据集架构还未建立,那就必须手动建立这两个架构,因为对一个对象
所作的架构更改不会被传播给另一个对象。反之,若要从XML文档开始并创建数据集,可以使用默认的
XMLDataDocument构造函数,然后引用其数据集属性。
myXdd = New XmlDataDocument()
myDS = myXDD.DataSet
如果使用这个方法,就必须通过将对象添加到数据集的表数据表的列集合来手动创建数据集架构。为
了能通过数据集使用Xml数据文档的数据,数据表和数据列的名称必须与Xml数据文档中的名称相匹配,名
称匹区分大小写的。
第二种方法需要的代码稍微多一些,提供了一个创建XML数据部分关系视图的机制。在数据集中复制整
个XML架构没有特殊要求。在数据集操作期间,所有不在数据集中的数据表和数据列都会被忽略。
任何时候,同步前或同步后,都可将数据加载入两个文档中。对一个对象所作的数据更改(包括添加
、删除或更改值)都会被自动映射到另一对象中。
Dim mySDD As System.Xml.XmlDataDocument
myXDD = New System.Xml.XmlDataDocument(Me.dsMaster1)
myXDD.Load ("dataOnly.xml")
SetBindings(Me.dsMaster1)
.NET框架对XML操作提供广泛支持,在System.XML名字空间中可以找到超过150个类,限于本人水平有
限,只研究了XML和ADO.NET数据集之间的接口。
总之,无论你喜欢与否,.NET框架都有一个令人难以拒绝的地方:这是个崭新的平台。在学习的过程
中都要投如较多的精力。从现在开始,我们都是初学者,所以,请大家多多指点。
四.用VB将WORD文档(或其他的二进制数据)生成xml文件并互相转换
1.??? 建立一个新的vb工程
2.??? 引用 Microsoft XML,版本 2.0 或以上
3.??? 在窗体form1上建立按钮 cmdCreateXML 和 cmdGetBinary
代码:
Option Explicit
Dim oDoc As DOMDocument
Dim DOCINPATH As String
Dim XMLOUTPATH As String
Dim DOCOUTPATH As String
Private Sub cmdCreateXML_Click()
???
??? Dim oEle As IXMLDOMElement
??? Dim oRoot As IXMLDOMElement
??? Dim oNode As IXMLDOMNode
???????
??? DOCINPATH = App.Path & "DocInput.doc"
??? XMLOUTPATH = App.Path & "XmlOuput.xml"
?????????
??? Call ReleaseObjects
???
??? Set oDoc = New DOMDocument
??? oDoc.resolveExternals = True
???
' Create processing instruction and document root
??? Set oNode = oDoc.createProcessingInstruction("xml", "version='1.0'")
??? Set oNode = oDoc.insertBefore(oNode, oDoc.childNodes.Item(0))
???
' Create document root
??? Set oRoot = oDoc.createElement("Root")
??? Set oDoc.documentElement = oRoot
??? oRoot.setAttribute "xmlns:dt", "urn:schemas-microsoft-com:datatypes"
' Add a few simple nodes with different datatypes
??? Set oNode = oDoc.createElement("Document")
??? oNode.Text = "Demo"
??? oRoot.appendChild oNode
???
??? Set oNode = oDoc.createElement("CreateDate")
??? oRoot.appendChild oNode
??? Set oEle = oNode
???
' Use DataType so MSXML will validate the data type
??? oEle.dataType = "date"
?? ??????
??? oEle.nodeTypedValue = Now
???
??? Set oNode = oDoc.createElement("bgColor")
??? oRoot.appendChild oNode
??? Set oEle = oNode
???
' Use DataType so MSXML will validate the data type
??? oEle.dataType = "bin.hex"
????????
??? oEle.Text = &HFFCCCC
???
??? Set oNode = oDoc.createElement("Data")
??? oRoot.appendChild oNode
??? Set oEle = oNode
???
' Use DataType so MSXML will validate the data type
??? oEle.dataType = "bin.base64"
????
' Read in the data
??? oEle.nodeTypedValue = ReadBinData(DOCINPATH)
???
' Save xml file
??? oDoc.save XMLOUTPATH
???
??? MsgBox XMLOUTPATH & " is created for you."
??
End Sub
Function ReadBinData(ByVal strFileName As String) As Variant
??? Dim lLen As Long
??? Dim iFile As Integer
??? Dim arrBytes() As Byte
?? ?Dim lCount As Long
??? Dim strOut As String
???
'Read from disk
??? iFile = FreeFile()
??? Open strFileName For Binary Access Read As iFile
??? lLen = FileLen(strFileName)
??? ReDim arrBytes(lLen - 1)
??? Get iFile, , arrBytes
??? Close iFile
???
??? ReadBinData = arrBytes
End Function
Private Sub WriteBinData(ByVal strFileName As String)
??? Dim iFile As Integer
??? Dim arrBuffer() As Byte
??? Dim oNode As IXMLDOMNode
?????
??? If Not (oDoc Is Nothing) Then
???????
' Get the data
??????? Set oNode = oDoc.documentElement.selectSingleNode("/Root/Data")
' Make sure you use a byte array instead of variant
??????? arrBuffer = oNode.nodeTypedValue
???????????
' Write to disk
???????
??????? iFile = FreeFile()
??????? Open strFileName For Binary Access Write As iFile
??????? Put iFile, , arrBuffer
??????? Close iFile
???
??? End If
???
End Sub
Private Sub cmdGetBinary_Click()
???????
??? DOCOUTPATH = App.Path & "DocOutput.doc"
???
??? Set oDoc = New DOMDocument
???
??? If oDoc.Load(XMLOUTPATH) = True Then
?????? ' Save the Doc as another file
?????? WriteBinData DOCOUTPATH
??????
?????? MsgBox DOCOUTPATH & " is created for you."
??? Else
??????? MsgBox oDoc.parseError.reason
??? End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
??? ReleaseObjects
End Sub
Private Sub ReleaseObjects()
??? Set oDoc = Nothing
End Sub
4.??? 建立word文档DocInput.doc.
5.??? 保存文档在工程目录下
6.???? 运行程序点击cmdCreateXML 按钮.一个 XML 文件XmlOuput.xml 就建立了.
点击 cmdGetBinary 按钮就可以生成word文档 DocOutput.doc.
???? 按照上面的方法,同样可以将任意的二进制数据存为xml,然后再重新生成二进制数据
可以用于web传输等等可以使用xmlhttp的地方
五.利用VB操作XML数据
什么是XML
扩展标记语言XML是一种简单的数据存储语言,使用一系列简单的标记描述数据,而这些标记可以用方
便的方式建立,虽然XML占用的空间比二进制数据要占用更多的空间,但XML极其简单易于掌握和使用。
XML与Access,Oracle和SQL Server等数据库不同,数据库提供了更强有力的数据存储和分析能力,例
如:数据索引、排序、查找、相关一致性等,XML仅仅是展示数据。事实上XML与其他数据表现形式最大的
不同是:他极其简单。这是一个看上去有点琐细的优点,但正是这点使XML与众不同。
XML的简单使其易于在任何应用程序中读写数据,这使XML很快成为数据交换的唯一公共语言,虽然不
同的应用软件也支持其它的数据交换格式,但不久之后他们都将支持XML,那就意味着程序可以更容易的与
Windows、Mac OS, Linux以及其他平台下产生的信息结合,然后可以很容易加载XML数据到程序中并分析他
,并以XML格式输出结果。
XML的优点
我们谈到XML长于在不同的应用程序之间交换数据,XML文件也便于构建小的数据库,不久以前,软件
都使用INI文件存储配置信息、用户参数以及其他信息,后来微软引入了系统注册表,接作微软告诉我们不
应该再使用INI文件了,从那时起Visual Basic对INI文件的支持被削弱了。但不幸的是注册表有几个致命
的缺点:不是简单的文本文件,难于读写、可能会变得庞大和缓慢、如果注册表不知何故出现问题,将有
可能造成系统死机。
将配置信息放在XML文件中可以避免这些问题,甚至可以将XML文件设置为一个共享文件,这样在不同
的计算机上的用户就可以共享数据,这是注册表所不能比拟的。
在被称为下一代ASP的ASP.NET中可以在WEB页中直接使用XML,你可以使用数据绑定控件直接绑定数据
并自动显示。
当然也可以不选择XML,使用文本文件、注册表、数据库都可以完成XML所能完成的任务,XML只是你在
数据存储和恢复的另一种工具而已。
XML语法简介
XML的语法非常的简单,XML文档由节点组成,使用打开和关闭节点描述标记,在格式上与HTML标记非
常相似,它们之间最大的不同是:XML中可以自由定义标记名。比如下面的标记就描述了一个电话号码:
<Phone>987-654-3210</Phone>
而且不用声明标记名就可以使用。
开始和结束标记必须相同,XML是识别大小写的,所以标记的大小写也必须相同。比如上面的例子中以
<Phone>标记开始就必须以</Phone>标记结束,而不能是</phone>或</PHONE>
节点标记中可以包含属性,比如下面的代码中Phone节点包含属性Type,其值为WorkFax:
<Phone Type="WorkFax">987-654-3210<Phone>
如果不愿意在节点中包含一个值,那么可以不需要结束标记,可以用在开始标记的后面加一个斜线来
结束节点,在下面的例子中,Phone标记的Number属性就存储了一个电话号码,所以就不需要一个结束标记
:
<Phone Type="WorkFax" Number="987-654-3210" />
XML文档的结构是一个树形等级结构。文档必须有一个唯一的根结点,根节点包含所有其它节点。下面
我们举一个较为完整的例子:
<Addresses>
<Entry Type="Personal">
<FirstName>Andy</FirstName>
<LastName>Fickle</LastName>
<Street>1234 Programmer Place</Street>
<City>Bugsville</City>
<State>CO</State>
<Zip>82379</Zip>
<Phone Type="Home">354-493-9489</Phone>
</Entry>
<Entry Type="Work">
<FirstName>Betty</FirstName>
<LastName>Masterson</LastName>
<Phone Type="Work">937-878-4958</Phone>
<Phone Type="WorkFax">937-878-4900</Phone>
</Entry>
...
</Addresses>
注意相似的节点不需要包含相同的信息,例如第一个Entry节点包含了地址信息和家庭电话号码,第二
个Entry节点包含了Work和WorkFax电话号码,而没有包含第一个Entry节点包含的信息。
XML工具
如前面的例子显示,XML语法是如此的简单以至于你可以在很短的时间作一个XML解析器,幸运的是你
不必这样做,因为XML工具可以运行在各种平台上,包括可以安装了Visual Basic的Windows。
正是这些L工具而不是XML本身使XML变得更强大和复杂。不同的解析器使你可以某一时刻加载整个XML
文档或只加载某个节点,与此相反,XML Writer 可以同时创建一个XML文档和节点。
DOM解析器使我们能够很方便的加载、复制、排序、修改和存储XML文件,遍历节点获得名称或属性,
并给结果排序。虽然他们的功能没有真正的关系数据库强大,但DOM的这些特点依然非常有用。
XSD可以定义XML文档的格式,XSL扩展样式单定义了怎样将XML文档转换成其他可以在WEB浏览器中浏览
的文件格式,比如HTML文件。
这些工具实际上比XML本身更复杂,所以所有讲解XML的书籍都花了很大的篇幅解释这些XML工具。但这
超出了本文的范围,有兴趣的读者可以参考有关资料。
Visual Basic.Net提供了使用XML、XSL以及其他XML工具的完整工具。但不用等待VB.NET,微软XML核
心服务(MSXML)版本4.0提供了从Visual Basic6.0加载和存储XML文档的工具。
在msdn.microsoft.com/xml/default.asp中下载最新版本的MSXML,并安装在计算机上。在Visual
Basic 6.0中使用Microsoft XML V4.0象引用其他对象一样,首先在工程菜单中选择引用菜单项,选择
Microsoft V4.0,单击OK,一切完成后就现在就可以在VB应用程序中添加XML对象了。
DOMDocument 类
文档对象模型(DOM)使用了一系列相应的对象描述了XML文档的等级状态,DOMDocument类是一个描绘
XML文档的DOM结构的MSXML类。
DOMDocument类仅仅提供了很少的几个有用的属性和方法。Load方法载入一个xml文件,loadxml方法将
字符串作为xml数据添加到对象中。例如,下面的代码就将一个小的xml文件添加到名为xml_document的文
档中。
Dim xml_document As New DOMDocument
xml_document.loadXML _
"<Person>" & vbCrLf & _
" <FirstName>Rod</FirstName>" & vbCrLf & _
" <LastName>Stephens</LastName>" & vbCrLf & _
"</Person>"
DOMDocument的xml属性返回文档的xml描述,可以显示这些返回值看看这些文档究竟是什么样子,也可
以将它存储为一个文件,但这完全不必要,因为DOMDocument对象的save方法已经自动将他们存储了。
DOMDocument对象的documentElement属性表示文档数据的根结点,通常情况下操作XML文档都从这里开
始。
DOMDocument提供了几种创建新节点的方法。CreateElement方法为文档创建一个新的元素节点,其他
创建节点的方法有createAttribute, createProcessingInstruction, 和 createTextNode,在这里就不一
一介绍了。
IXMLDOMNode类
IXMLDOMNode类描述了一个节点,该类提供了一系列用于搜索和操纵XML文档的属性和方法。
selectSingleNode 方法用于搜索指定节点的后代,用于搜索指定节点路径的语言称为XPATH,XPATH非常棘
手,本文就不详细说明其规范了。下面我们将介绍两个对搜索子节点有特别有用并且简单的方法。
在给selectsingleNode方法中输入子节点的名字,该方法将在节点的子节点进行精确匹配搜索。如果
在输入的字符串前面加上".//",那么将搜索节点的全部后代。
' Search for a child node named "LastName."
Set last_name_node = address_node.selectSingleNode("LastName")
' Search for any descendant named "LastName."
Set last_name_node = address_node.selectSingleNode(".//LastName")
下面列出了IXMLDOMNode对象的部分非常有用的属性:
attributes.节点属性集合
nodeName.节点的标记名
nodeTypeString.节点的类型
ownerDocument.返回DOMDocument对象包含的节点
text.表示节点包含的文本内容。如果该节点包含其他节点,那么text代表了所有节点的文本内容的
组合。
xml.给出了节点的xml内容,例如:"<FirstName>Rod</FirstName>".
ChildNodes集合包含了节点的子节点。要给节点增加一个子节点,首先必须给使用DOMDocument对象的
节点创建方法,然后将这个新建的节点加入到父节点的childNodes集合中。下面的代码展示了创建一个新
的子节点的子程序,并使用父节点的appendChild方法将其加入到父节点中:
' Add a new node to the indicated parent node.
Private Sub CreateNode(ByVal indent As Integer, _
ByVal parent As IXMLDOMNode, ByVal node_name As String, _
ByVal node_value As String)
Dim new_node As IXMLDOMNode
' Create the new node.
Set new_node = parent.ownerDocument.createElement(node_name)
' Set the node's text value.
new_node.Text = node_value
' Add the node to the parent.
parent.appendChild new_node
End Sub
SaveValues 程序
现在我们可以使用XML创建一个简单的程序(如图1),其值存储到XML文件中,在程序开始运行时,程
序从VALUE.XML文件中加载数据,在程序运行结束时,将程序中的现行值存入VALUE.XML文件中。
下面的代码是显示了VALUE.XML文件的结构:
<Values>
<FirstName>Rod</FirstName>
<LastName>Stephens</LastName>
<Street>1234 Programmer Place</Street>
<City>Bugsville</City>
<State>CO</State>
<Zip>80276</Zip>
</Values>
List1显示了怎样编写SaveValues,当载入表单时,form_load事件触发LoadValues子程序。
LoadValues创建了一个名为xml_document的DOMDocument对象,然后载入xml文件,使用
selectSingleNode方法查找名为values的节点,然后使用GetNodeValue方法获得从value节点后代中得到的
值。
GetNodeValue使用value节点的selectSingleNode方法寻找目标节点,如果节点不存在函数将返回一个
缺省值,如果找到这个节点GetNodeValue将返回该节点的text值。对于value.xml文件中的数据节点,text
仅仅是包含在节点中的文本内容。
当窗体卸载时触发form_unload事件,unload事件调用SaveValues子程序。程序创建一个新的
DOMDocument对象,该对象创建一个新的名为value的节点,然后用文档的appendChild方法将节点添加到文
档中。
在创建所有新的节点后,SaveValues调用DOMDocument's save方法存储新的xml文件。
注意这个新的文件已经覆盖了旧文件,使用DOMDocument对象无法部分改变XML文件,可以加载XML文件
,然后修改其中一部分,然后保存文件,但原文件将被完全覆盖。这是一个小的缺陷,但在这时可以使用
其它程序进行修改。
List1的最后一部分是CreateNode子程序,CreateNode 为父节点创建一个新节点并同时给这个节点赋
值。在这个子程序中首先引用一个DOMDocument对象,然后使用该对象的createElement方法创建一个新的
节点。
createNode方法设置节点的text属性,然后将节点作为子节点添加到父节点中。
List1:
Option Explicit
Private m_AppPath As String
Private Sub Form_Load()
' Get the application's startup path.
m_AppPath = App.Path
If Right$(m_AppPath, 1) <> "" Then m_AppPath = m_AppPath & ""
' Load the values.
LoadValues
End Sub
Private Sub Form_Unload(Cancel As Integer)
' Save the current values.
SaveValues
End Sub
' Load saved values from XML.
Private Sub LoadValues()
Dim xml_document As DOMDocument
Dim values_node As IXMLDOMNode
' Load the document.
Set xml_document = New DOMDocument
xml_document.Load m_AppPath & "Values.xml"
' If the file doesn't exist, then
' xml_document.documentElement is Nothing.
If xml_document.documentElement Is Nothing Then
' The file doesn't exist. Do nothing.
Exit Sub
End If
' Find the Values section.
Set values_node = xml_document.selectSingleNode("Values")
' Read the saved values.
txtFirstName.Text = GetNodeValue(values_node, "FirstName", "???")
txtLastName.Text = GetNodeValue(values_node, "LastName", "???")
txtStreet.Text = GetNodeValue(values_node, "Street", "???")
txtCity.Text = GetNodeValue(values_node, "City", "???")
txtState.Text = GetNodeValue(values_node, "State", "???")
txtZip.Text = GetNodeValue(values_node, "Zip", "???")
End Sub
' Return the node's value.
Private Function GetNodeValue(ByVal start_at_node As IXMLDOMNode, _
ByVal node_name As String, _
Optional ByVal default_value As String = "") As String
Dim value_node As IXMLDOMNode
Set value_node = start_at_node.selectSingleNode(".//" & node_name)
If value_node Is Nothing Then
GetNodeValue = default_value
Else
GetNodeValue = value_node.Text
End If
End Function
' Save the current values.
Private Sub SaveValues()
Dim xml_document As DOMDocument
Dim values_node As IXMLDOMNode
' Create the XML document.
Set xml_document = New DOMDocument
' Create the Values section node.
Set values_node = xml_document.createElement("Values")
' Add the Values section node to the document.
xml_document.appendChild values_node
' Create nodes for the values inside the
' Values section node.
CreateNode values_node, "FirstName", txtFirstName.Text
CreateNode values_node, "LastName", txtLastName.Text
CreateNode values_node, "Street", txtStreet.Text
CreateNode values_node, "City", txtCity.Text
CreateNode values_node, "State", txtState.Text
CreateNode values_node, "Zip", txtZip.Text
' Save the XML document.
xml_document.save m_AppPath & "Values.xml"
End Sub
' Add a new node to the indicated parent node.
Private Sub CreateNode(ByVal parent As IXMLDOMNode, _
ByVal node_name As String, ByVal node_value As String)
Dim new_node As IXMLDOMNode
' Create the new node.
Set new_node = parent.ownerDocument.createElement(node_name)
' Set the node's text value.
new_node.Text = node_value
' Add the node to the parent.
parent.appendChild new_node
End Sub
SaveValuesIndented 程序
虽然每个人都化了很大的精力去处理xml文档,使他们看上更容易些,但xml工具一般都忽略了那些使
xml文档结构明显的空白和缩进,xml解析器也同样忽略缩进和空白
不幸的是我们例子也同样忽略了这些缩进和空白,SaveValues创建了一个象下面那样的xml文件,所有的代
码都在同一行中。
<Values><FirstName>Rod</FirstName><LastName>Stephens</LastNa
me><Street>1234 Programmer Place</Street><City>Bugsville</Ci
ty><State>CO</State><Zip>80276</Zip></Values>
VB.NET中包括了文本写入类,可以XML文档规定格式。但MSXML重没有这种功能,所以如果需要以一种
清晰的格式保存XML文件,只能另行添加它的格式。
List2列出了程序SaveValuesIndented使用的代码,SaveValues子程序与上面例子中讲的几乎完全相同
,但他在创建value节点后同时给XML文档创建了一个<value>标记的新行。
然后SaveValues 调用CreateNode创建一个新的数据节点,但在这里它传递给CreateNode一个新的参数
,这个参数表示这个新节点的缩进方式。
CreateNode
' Save the current values.
Private Sub SaveValues()
Dim xml_document As DOMDocument
Dim values_node As IXMLDOMNode
' Create the XML document.
Set xml_document = New DOMDocument
' Create the Values section node.
Set values_node = xml_document.createElement("Values")
' Add a new line.
values_node.appendChild xml_document.createTextNode(vbCrLf)
' Add the Values section node to the document.
xml_document.appendChild values_node
' Create nodes for the values inside the
' Values section node.
CreateNode 4, values_node, "FirstName", txtFirstName.Text
CreateNode 4, values_node, "LastName", txtLastName.Text
CreateNode 4, values_node, "Street", txtStreet.Text
CreateNode 4, values_node, "City", txtCity.Text
CreateNode 4, values_node, "State", txtState.Text
CreateNode 4, values_node, "Zip", txtZip.Text
' Save the XML document.
xml_document.save m_AppPath & "Values.xml"
End Sub
' Add a new node to the indicated parent node.
Private Sub CreateNode(ByVal indent As Integer, _
ByVal parent As IXMLDOMNode, ByVal node_name As String, _
ByVal node_value As String)
Dim new_node As IXMLDOMNode
' Indent.
parent.appendChild parent.ownerDocument.createTextNode(Space$(indent))
' Create the new node.
Set new_node = parent.ownerDocument.createElement(node_name)
' Set the node's text value.
new_node.Text = node_value
' Add the node to the parent.
parent.appendChild new_node
' Add a new line.
parent.appendChild parent.ownerDocument.createTextNode(vbCrLf)
End Sub
结论
本文仅仅揭示XML编程的表面,本文的例子中的涉及只是非常简单的XML文件,但你可以使用使用本文
揭示的技术做更多的事情,比如配置设置、表单位置、以及其他信息。XML已经向前更进一步的发展了,有
了更复杂的数据层次。对于更复杂的数据结构,在运行时可以更容易的使用MSXML对象来存取XML文件
6 篇评论在 “VB & XML 相关文章集锦”
2
匿名
08/01 2008, 13:54 Say: [回复]
soon as possible.level wow.Just remember that .
mp3 mp4 player.You will need to know .mp3 mp4
player.Below are things you wow.Such as,
mp3 players.I’m going to try to cover the dog
mp3 player.Remember , you will be there .sell wow
gold.1.
buy cheap wow gold.Do you have a specific breed in mind.
buy world of warcraft goldDon’t assume that .
buying wow gold.Is the breed important to you
wow billig gold. 2.
wow gold kauf.Do you require ownership of the dog.
wowgold.3.
günstig wow gold.Does the school do
follow up visits for the graduated team.or wow.Do you feel
more secure .gold wow.4.
wow power leveling.Does the school have a good
reputation.wow level.Try talking with people who
have graduated from the programs.lotro gold.Most won’t
mind answering a few questions.power
level.5.power leveling.Are
you eligible for the schools program.
powerleveling wow.Are you
legally blind or totally blind.
wow leveling.Are you physically able to train
with a dog .wow lvl 70..Will the school
accommodate your level of ability.
3
匿名
08/01 2008, 13:52 Say: [回复]
We every know that .wow level service. new level 70
characters .mp3 players.
a week in order to .mp3 player. Welfare epics.
wow. Maybe.mp3
players. but having decent gear makes it easier.mp3 player. for many players to
progress.
wow gold. It make some time .
gold wow. play their classes.wow geld.
in a competitive PvP setting.wow gold
paypal. Despite their prizewinning efforts.wowgold. Blizzard has largely .
wow gold günstig.
the creation of a minor league field with .wow power
leveling. The oginal poster .lwow or. A minor league for PvP might
gold wow. in the field.
world of warcraft power leveling. It would also
earmark elite players to.portable mp3 player. only be bracketed with folks .
portable mp3 players. field reqards.
wow lvl. Other flaws mentioned by responders
included the idea.lecteurs mp3. that players .
4
匿名
08/01 2008, 13:51 Say: [回复]
Once you have the materials.wow gold. you need to sell the items.
wow gold.
This can be the hardest part.wow gold kaufen. or the easiest part.
world of warcraft gold. It all depends on .
wow geld. and what players are wanting.
wow powerlevel. I've found
that .buy wow gold. server until 10 p.m.
wow. server.wow gold.you have scheduled
raids during part of this time.cheap wow gold. That's where the second account comes
in.serveur wow. Make a
macro that.wow europe. You will get a lot
cheapest wow gold. and you'll have stacks of gold .
wow power leveling. When it is not prime time.
wow powerlevelinggold wow. I
recommend that .mp3 players. There are always the odd players .
mp3 player. in the morning.
wow gold. and you want to be able to get to them as
well.mp3 player. Additionally if you have two items the best thing.
zubehoer mp3 player. to do is to put one up on the AH.
wow gold kaufen. and keep the other around to sell via the
trade channel.mp3. netting you a total of 3,000g.
mp4. Do this each week for a month.
wow geld. For me raiding costs
mp3 players. so in the end mp3 player. Not too
bad.
5
6
Yang
02/17 2006, 14:56 Say: [回复]
你好,我是一个在校生,我阅读了你的《在超图的前景》,想向你了解一下超图的情况,可以吗?
我的邮箱是 yangsh@sina.com
期待你的建议。
发表评论
soon as possible.level wow.Just remember that .
mp3 mp4 player.You will need to know .mp3 mp4
player.Below are things you wow.Such as,
mp3 players.I’m going to try to cover the dog
mp3 player.Remember , you will be there .sell wow
gold.1.
buy cheap wow gold.Do you have a specific breed in mind.
buy world of warcraft goldDon’t assume that .
buying wow gold.Is the breed important to you
wow billig gold. 2.
wow gold kauf.Do you require ownership of the dog.
wowgold.3.
günstig wow gold.Does the school do
follow up visits for the graduated team.or wow.Do you feel
more secure .gold wow.4.
wow power leveling.Does the school have a good
reputation.wow level.Try talking with people who
have graduated from the programs.lotro gold.Most won’t
mind answering a few questions.power
level.5.power leveling.Are
you eligible for the schools program.
powerleveling wow.Are you
legally blind or totally blind.
wow leveling.Are you physically able to train
with a dog .wow lvl 70..Will the school
accommodate your level of ability.
We every know that .wow level service. new level 70
characters .mp3 players.
a week in order to .mp3 player. Welfare epics.
wow. Maybe.mp3
players. but having decent gear makes it easier.mp3 player. for many players to
progress.
wow gold. It make some time .
gold wow. play their classes.wow geld.
in a competitive PvP setting.wow gold
paypal. Despite their prizewinning efforts.wowgold. Blizzard has largely .
wow gold günstig.
the creation of a minor league field with .wow power
leveling. The oginal poster .lwow or. A minor league for PvP might
gold wow. in the field.
world of warcraft power leveling. It would also
earmark elite players to.portable mp3 player. only be bracketed with folks .
portable mp3 players. field reqards.
wow lvl. Other flaws mentioned by responders
included the idea.lecteurs mp3. that players .
Once you have the materials.wow gold. you need to sell the items.
wow gold.
This can be the hardest part.wow gold kaufen. or the easiest part.
world of warcraft gold. It all depends on .
wow geld. and what players are wanting.
wow powerlevel. I've found
that .buy wow gold. server until 10 p.m.
wow. server.wow gold.you have scheduled
raids during part of this time.cheap wow gold. That's where the second account comes
in.serveur wow. Make a
macro that.wow europe. You will get a lot
cheapest wow gold. and you'll have stacks of gold .
wow power leveling. When it is not prime time.
wow powerlevelinggold wow. I
recommend that .mp3 players. There are always the odd players .
mp3 player. in the morning.
wow gold. and you want to be able to get to them as
well.mp3 player. Additionally if you have two items the best thing.
zubehoer mp3 player. to do is to put one up on the AH.
wow gold kaufen. and keep the other around to sell via the
trade channel.mp3. netting you a total of 3,000g.
mp4. Do this each week for a month.
wow geld. For me raiding costs
mp3 players. so in the end mp3 player. Not too
bad.
你好,我是一个在校生,我阅读了你的《在超图的前景》,想向你了解一下超图的情况,可以吗?
我的邮箱是 yangsh@sina.com
期待你的建议。



I also know that .free online games.Just remember that choosing a Training program
for yourself a.play war games.a college.
free online war games.You will need to know a lot about.
online games.the program and what you really need from a specific Guide Dog
school.