<?xml version="1.0" encoding="utf-8" ?>
- <ArrayOfAnyType xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://tempuri.org/WebService1/index">
<anyType xsi:type="xsd:string">XXXX字条串1</anyType>
<anyType xsi:type="xsd:string">XXXX字条串2</anyType>
<anyType xsi:type="xsd:string">XXXX字条串3</anyType>
<anyType xsi:type="xsd:string">XXXX字条串4</anyType>
<anyType xsi:type="xsd:string">XXXX字条串5</anyType>
</ArrayOfAnyType>1、以上XML存成一个“文件”可以直接绑定DATAGRID,如果把上面的XML作为一个string变量是否有办法绑定GRID。
2、如何用正则把里面的“XXXX字条串”取出来。
- <ArrayOfAnyType xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://tempuri.org/WebService1/index">
<anyType xsi:type="xsd:string">XXXX字条串1</anyType>
<anyType xsi:type="xsd:string">XXXX字条串2</anyType>
<anyType xsi:type="xsd:string">XXXX字条串3</anyType>
<anyType xsi:type="xsd:string">XXXX字条串4</anyType>
<anyType xsi:type="xsd:string">XXXX字条串5</anyType>
</ArrayOfAnyType>1、以上XML存成一个“文件”可以直接绑定DATAGRID,如果把上面的XML作为一个string变量是否有办法绑定GRID。
2、如何用正则把里面的“XXXX字条串”取出来。
doc.LoadXml(str)
Me.GridView1.DataSource = doc
Me.GridView1.DataBind()
XPATH表达式不能用吗?把这个XML文档直接当作是数据文件来操作,这样才比较直观
XPATH不行?
把XML文件当作数据来操作不是更好吗?