XML和关系数据----从XML推断数据集映射
2006-12-06 19:34
399 查看
如何从 XML 推导出数据集映射
此示例阐释如何从 XML 数据创建数据集 (DataSet) 映射。此示例使用推理概念,由此可以使 XML 数据本身的实际结构成为关系架构的基础。然后,该示例创建表和列的关系结构,用来存储符合推导出的架构的数据集中的数据。
|
function doClick(index, numTabs, id) {
document.all("tab" + id, index).className = "tab";
for (var i=1; i
td.code {
padding:0,10,0,10;
border-style:solid;
border-width:1;
border-bottom:0;
border-top:0;
border-right:0;
border-color:cccccc;
background-color:ffffee
}
td.tab {
text-align:center;
font:8pt verdana;
width:15%;
padding:3,3,3,3;
border-style:solid;
border-width:1;
border-right:0;
border-color:black;
background-color:eeeeee;
cursor:hand
}
td.backtab {
text-align:center;
font: 8pt verdana;
width:15%;
padding:3,3,3,3;
border-style:solid;
border-width:1;
border-right:0;
border-color:black;
background-color:cccccc;
cursor:hand
}
td.space {
width:70%;
font: 8pt verdana;
padding:0,0,0,0;
border-style:solid;
border-bottom:0;
border-right:0;
border-width:1;
border-color:cccccc;
border-left-color:black;
background-color:white
}
// Infer the DataSet schema from the XML data and load the XML Data datadoc.DataSet.ReadXml(new StreamReader("books.xml"), XmlReadMode.InferSchema); ' Infer the DataSet schema from the XML data and load the XML Data datadoc.DataSet.ReadXml(new StreamReader("books.xml"), XmlReadMode.InferSchema) | ||
C# | VB |
Creating an XmlDataDocument ... Content of Tables ... TableName = book --------- Columns ... title book_Id price genre publicationdate ISBN Number of rows = 3 Rows ... The Autobiography of Benjamin Franklin 0 8.99 autobiography 1981 1-861003-11-0 The Confidence Man 1 11.99 novel 1967 0-201-63361-2 The Gorgias 2 9.99 philosophy 1991 1-861001-57-6 TableName = author --------- Columns ... first-name last-name book_Id Number of rows = 3 Rows ... Benjamin Franklin 0 Herman Melville 1 Sidas Plato 2
摘要
推理是一种机制,通过它使得 XML 数据的结构成为关系架构的基础。数据集的 ReadXml 方法使用 StreamReader 中所提供的 XML 文件生成关系映射。
相关文章推荐
- XML和关系数据----将数据集映射保存到XSD架构文件
- XML和关系数据----从XSD架构创建数据集映射
- XML和关系数据----从XSD架构创建数据集映射
- XML和关系数据----用XML加载数据集
- XML和关系数据----将数据集保存为XML
- 通过映射关系 动态转义为统一格式的数据 (支持 JSON 和 XML )
- 对象关系与数据表映射
- struts.xml文件定义Action处理结果与视图资源之间的映射关系
- 【hibernate框架】关系映射之一对一单向外键关联(XML实现)
- 从 XML 推断 DataSet 关系结构
- 了解传输信道的使用、传输信道特性、描述来自上层的数据在进行扩频前的处理过程、传输信道向物理信道的映射关系。
- Hibernate中,One2Many和Many2One的双向映射关系的XML实现方式
- [原创]java WEB学习笔记77:Hibernate学习之路---Hibernate 版本 helloword 与 解析,.环境搭建,hibernate.cfg.xml文件及参数说明,持久化类,对象-关系映射文件.hbm.xml,Hibernate API (Configuration 类,SessionFactory 接口,Session 接口,Transaction(事务))
- 将对象层次结构映射到 XML 数据
- andoird通过反射将xml数据映射到java类里
- AgileEAS.NET之数据关系映射ORM
- 【数据】ZACHARY空手道俱乐部成员关系网络数据集
- SQL 数据类型和 Java 数据类型间的映射关系(转)
- Spring、MyBatis的整合数据映射器类(UserMapper->iocContext.xml)配置文件详解
- Object/DataSet Relational Mapping(对象/数据集关系映射)完整版本