我有下面的文件:
<?xml version="1.0" encoding="UTF-8"?>
<bindings xmlns="http://java.sun.com/xml/ns/jaxb"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://java.sun.com/xml/ns/jaxb"
version="2.1">
<bindings xs:schemaLocation="Inbound.wsdl#wsdl:types" node="/schema">
<bindings node="//complexType[@name='TradeIdWithRef']">
<bindings node=".//attribute[@name='_value']">
<property name="ValueAttribute"/>
</bindings>
</bindings>
<bindings node="//complexType[@name='Bank']">
<bindings node=".//attribute[@name='_value']">
<property name="ValueAttribute"/>
</bindings>
</bindings>
<bindings node="//complexType[@name='Bid']">
<bindings node=".//attribute[@name='_value']">
<property name="ValueAttribute"/>
</bindings>
</bindings>
<bindings node="//complexType[@name='addMarketExRequest']">
<bindings node=".//attribute[@name='_value']">
<property name="ValueAttribute"/>
</bindings>
</bindings>
<bindings node="//complexType[@name='Offer']">
<bindings node=".//attribute[@name='_value']">
<property name="ValueAttribute"/>
</bindings>
</bindings>
<bindings node="//complexType[@name='Price']">
<bindings node=".//attribute[@name='_value']">
<property name="ValueAttribute"/>
</bindings>
</bindings>
<bindings node="//complexType[@name='Delta']">
<bindings node=".//attribute[@name='_value']">
<property name="ValueAttribute"/>
</bindings>
</bindings>
</bindings>
</bindings>但是,在xml验证时总是会出现以下错误:
cvc-elt.1: Cannot find the declaration of element 'bindings'. [5]有人能帮忙吗?
发布于 2014-03-14 15:47:08
schemaLocation属性必须包含模式的名称空间和到模式定义文件,separated by whitespace的路径。
而且,我不确定这是一个错误,但我不知道为什么要在子节点而不是根节点上声明schemaLocation。
https://stackoverflow.com/questions/22069285
复制相似问题