在使用Bulkload函数将XML文件中的数据导入到数据库时出现这个错误。映射文件Schema格式应该没什么问题,之前运行都好好的。不知道为什么会突然出现这个问题。请多多指教。

解决方案 »

  1.   

    可是Schema这个词是不用声明的啊
      

  2.   

    如果要解析xml,需要声明xml架构。看看是不是新数据不满足shema设定的格式
      

  3.   

    The element 'xs:schema' is used but not declared in the DTD/Schema用xmlspy 和 stylus studio 都校验过 testing10.xml 和关联的testing10schema.xsd 关联后是没有问题的。 
    看不出来'xs:schema' 没有定义啊 
    XML文件如下 <?xml version="1.0" encoding="UTF-8"?>
    <root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="testing10schema.xsd"></root>
    用到的Schema文件框架如下: 
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" elementFormDefault="qualified" attributeFormDefault="unqualified" xsi:schemaLocation="
            http://www.w3.org/2001/XMLSchema
            http://www.w3.org/2001/XMLSchema.xsd">
        <xs:element name="root">
            <xs:complexType>
                <xs:sequence>
                    <xs:element name="common" type="common"/>
                    <xs:element name="data" type="data"/>
                </xs:sequence>
            </xs:complexType>
        </xs:element></xs:schema>
      

  4.   

    用到的Schema文件框架如下: <?xml version="1.0" encoding="UTF-8"?> 
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" elementFormDefault="qualified" attributeFormDefault="unqualified" xsi:schemaLocation=" 
            http://www.w3.org/2001/XMLSchema 
            http://www.w3.org/2001/XMLSchema.xsd"> 
        <xs:element name="root"> 
            <xs:complexType> 
                <xs:sequence> 
                    <xs:element name="common" type="common"/> 
                    <xs:element name="data" type="data"/> 
                </xs:sequence> 
            </xs:complexType> 
        </xs:element> </xs:schema>