Extjs xml reader 不工作
Extjs xml reader not working
我有以下XML配置...
<?xml version="1.0" encoding="UTF-8"?>
<Schema xmlns="http://schemas.microsoft.com/ado/2008/09/edm" Namespace="IncidentMgt">
<EntityType Name="in">
<Property Name="persistent_id" Type="Edm.String" Nullable="true" MaxLength="30"/>
<Property Name="active_f" Type="Edm.Int32" Nullable="true"/>
<Property Name="add_property_persids" Type="Edm.String" Nullable="true"/>
<Property Name="add_workflow_persids" Type="Edm.String" Nullable="true"/>
</EntityType>
<EntityType Name="at">
<Property Name="persistent_id" Type="Edm.String" Nullable="true" MaxLength="30"/>
<Property Name="active_f" Type="Edm.Int32" Nullable="true"/>
<Property Name="add_property_persids" Type="Edm.String" Nullable="true"/>
<Property Name="add_workflow_persids" Type="Edm.String" Nullable="true"/>
</EntityType>
</Schema>
以下是我的XMLReader配置:
reader : {
type : 'xml',
record : 'Property',
rootProperty: 'EntityType',
}
我的模特:
fields: [{name:'Name',mapping:'@Name'}]
我在加载商店时遇到问题....你能告诉我 mistake/where 在哪里吗我应该改变才能使这项工作
没有其余代码,我无法告诉您错误。
这是使用您提供的数据的working example。
将它与你的代码进行比较,也许你能找到问题。
我有以下XML配置...
<?xml version="1.0" encoding="UTF-8"?>
<Schema xmlns="http://schemas.microsoft.com/ado/2008/09/edm" Namespace="IncidentMgt">
<EntityType Name="in">
<Property Name="persistent_id" Type="Edm.String" Nullable="true" MaxLength="30"/>
<Property Name="active_f" Type="Edm.Int32" Nullable="true"/>
<Property Name="add_property_persids" Type="Edm.String" Nullable="true"/>
<Property Name="add_workflow_persids" Type="Edm.String" Nullable="true"/>
</EntityType>
<EntityType Name="at">
<Property Name="persistent_id" Type="Edm.String" Nullable="true" MaxLength="30"/>
<Property Name="active_f" Type="Edm.Int32" Nullable="true"/>
<Property Name="add_property_persids" Type="Edm.String" Nullable="true"/>
<Property Name="add_workflow_persids" Type="Edm.String" Nullable="true"/>
</EntityType>
</Schema>
以下是我的XMLReader配置:
reader : {
type : 'xml',
record : 'Property',
rootProperty: 'EntityType',
}
我的模特:
fields: [{name:'Name',mapping:'@Name'}]
我在加载商店时遇到问题....你能告诉我 mistake/where 在哪里吗我应该改变才能使这项工作
没有其余代码,我无法告诉您错误。
这是使用您提供的数据的working example。
将它与你的代码进行比较,也许你能找到问题。