易截截图软件、单文件、免安装、纯绿色、仅160KB

Ext.data.Store 读取XML属性值


data.xml
<?xml version="1.0" encoding="UTF-8"?>
<Items>
<Item ASIN="0446355453"
Author="Sidney Sheldon"
Manufacturer="Warner Books"
ProductGroup="Book"
Title="Master of the Game"/>

<Item ASIN="0446613657"
Author="Sidney Sheldon"
Manufacturer="Warner Books"
ProductGroup="Book"
Title="Are You Afraid of the Dark?"/>

<Item ASIN="0446357421"
Author="Sidney Sheldon"
Manufacturer="Warner Books"
ProductGroup="Book"
Title="If Tomorrow Comes"/>

<Item ASIN="0446607207"
Author="Sidney Sheldon"
Manufacturer="Warner Books"
ProductGroup="Book"
Title="Tell Me Your Dreams"/>

<Item ASIN="0446357448"
Author="Sidney Sheldon"
Manufacturer="Warner Books"
ProductGroup="Book"
Title="Bloodline"/>
</Items>

/**
* Ext.data.Store 读取XML属性值
* @author KJW
* @param {} config
*/
TestGrid = function(config) {
config = config || {};

this.cm = new Ext.grid.ColumnModel([
{header : 'Author', dataIndex: 'Author'},
{header : 'Manufacturer', dataIndex: 'Manufacturer'},
{header : 'ProductGroup', dataIndex: 'ProductGroup'},
{header : 'Title', dataIndex: 'Title'}
]);

this.store = new Ext.data.Store({
url : 'data.xml',
reader : new Ext.data.XmlReader({
record : 'Item',
id : '@ASIN',
totalRecords: '@total'
}, [
{name: 'Author', mapping: '@Author'},
{name: 'Manufacturer', mapping: '@Manufacturer'},
{name: 'ProductGroup',


相关文档:

XML与CSS ID选择符的使用

ID.xml
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="ID.css"?>
<bookdetail>
<book class="A" id="B1">
<author>曹雪芹</author>
<title>红楼梦</title>
<price>60.00</price>
</book>
<book class="A ......

关于HTTP访问XML文件的随笔

最近项目中要用到一些web xml数据的访问分析,采用msxml
1.msxml是微软提供的,在非开发环境中,需要注册
2.xml文件,一般在第一句有编码方式,一般默认是utf-8,属于一种unicode
3.从网络采集的xml数据,需要使用winnet函数库
4.winnet采集自网络的数据,默认的都是CP_ACP格式的,简单说就是ANSI或UNICODE,UTF8的编码 ......

xsd与xml和类(class)对象之间的互相转换

xsd与xml和类(class)对象之间的互相转换
.
第一:通过现有的已经写好的xsd来生成class(.cs)文件。
在您Visual Studio的安装目录下的SDKv2.0Bin中有个应用程序xsd.exe(通过这个应用程序可以使用xsd来创建类文件)。
具体操作:通过打开Visual Studio 命令提示,可以输入xsd指令来查看一些具体的操作指令的用处,然后 ......

使用XmlDocument类完成对XML的查、删、添、改

使用XmlDocument类完成对XML的查、删、添、改
http://www.aspdiy.net/article/53.htm
后台C#代码
  1using System;
  2using System.Collections;
  3using System.ComponentModel;
  4using System.Data;
  5using System.Drawing;
  6using System. ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号