XML模式定义中的字符串长度

时间:2018-12-03 06:32:04

标签: xml visual-studio-2015 ssis

我使用rest API从服务中下载每日XML文件,并与在Visual Studio 2015中创建的SSIS文件一起读取。在文件中,我具有以下文本

<?xml version="1.0" encoding="UTF-8" standalone="true"?>
<questionnaire id="123456">
    <foreground>
        <variable reference="12345678" name="s_1000" type="string">
            <text lang="da">This text is more than 255 characters long</text>
        </variable>
    </foreground>
</questionnaire>

服务中没有XSD文件,因此Visual Studio将创建XSD文件。 代码看起来像这样

    <xs:element minOccurs="0" name="foreground">
      <xs:complexType>
        <xs:sequence>
          <xs:element minOccurs="0" maxOccurs="unbounded" name="variable">
            <xs:complexType>
              <xs:sequence>
                <xs:element minOccurs="0" name="text">
                  <xs:complexType>
                    <xs:simpleContent>
                      <xs:extension base="xs:string">
                        <xs:attribute name="lang" type="xs:string" use="optional" />
                      </xs:extension>
                    </xs:simpleContent>
                  </xs:complexType>
                </xs:element>
              </xs:sequence>
            </xs:complexType>
          </xs:element>
        </xs:sequence>
      </xs:compexType>
    </xs:element>

我使用XML源组件。问题是XML文件包含的文本长度超过255个字符,我无法弄清楚如何获取SSIS包来读取它。我已经尝试了许多在Internet上找到的不同建议,以使XSD文件中的字符串的长度为2000个字符,但到目前为止仍未成功。我该如何解决?

0 个答案:

没有答案
相关问题