mxml 文件出现“元素类型“组件”错误”后面必须跟有任一属性规范`
我遇到类似
元素类型“组件”必须后跟任一属性规范“>” 的
问题,并且我的 mxml 文件中的
<?xml version="1.0" encoding="utf-8"?>
<components:View xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:components="spark.components.*" title="Home" creationComplete="srv.send()">
<fx:Declarations>
<s:HTTPService id="srv" url="assets/employees.xml"/>
</fx:Declarations>
<s:List id="list" top="0" bottom="0" left="0" right="0"
dataProvider="{srv.lastResult.list.employee}"
labelField="lastName"/>
</components:View>
<components:View xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:components="spark.components.*" title="Home" creationComplete="srv.send()">
这一行给出了类似以下行的错误 元素类型“组件”后面必须跟有属性规范“>”
为什么会出现此错误?
I am getting problem like
Element type "components" must be followed by either attribute specifications, ">"
and my mxml file is
<?xml version="1.0" encoding="utf-8"?>
<components:View xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:components="spark.components.*" title="Home" creationComplete="srv.send()">
<fx:Declarations>
<s:HTTPService id="srv" url="assets/employees.xml"/>
</fx:Declarations>
<s:List id="list" top="0" bottom="0" left="0" right="0"
dataProvider="{srv.lastResult.list.employee}"
labelField="lastName"/>
</components:View>
<components:View xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:components="spark.components.*" title="Home" creationComplete="srv.send()">
this line gives me error like following line
Element type "components" must be followed by either attribute specifications, ">"
Why am I getting this error?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
以下是需要考虑的一些事项:
1) 您没有使用移动组件项目,因此没有将移动组件添加到库路径中。 View 是一个移动组件。如果是这种情况,您可以手动将其添加到类路径中。
2)将 Spark 组件定义为与默认的 's' 命名空间分开的命名空间是很奇怪的:。这种方法会更常见:
Here are a few things to consider:
1) You aren't using a Mobile Component project, and therefore do not have mobile components added to the library path. View is a Mobile Component. IF this is the case you can add it to the class path manually.
2) It is odd to define the spark components as a namespace separate of the default 's' namespace:. This approach would be more common: