“架构元素中不允许使用非空白字符”
我有一个由客户提供的 XML 文件,
<?xml version="1.0" encoding="UTF-8"?>
<PhysicalProperty xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation=''>
<Property>
<Identification type="unspecified" rentalType="unspecified">
<PrimaryID>1</PrimaryID>
<SecondaryID>1</SecondaryID>
<MarketingName>tewraewr</MarketingName>
<OwnerLegalName>aerwerwe</OwnerLegalName>
</Identification>
</Property>
</PhysicalProperty>
它曾经工作正常。但是现在它给出错误
“架构元素中不允许使用非空白字符。看到'tewraewr'”
如果我删除PhysicalProperty中的属性,它工作正常。如何在不删除属性的情况下使其工作?
I have an XML File provided by client
<?xml version="1.0" encoding="UTF-8"?>
<PhysicalProperty xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation=''>
<Property>
<Identification type="unspecified" rentalType="unspecified">
<PrimaryID>1</PrimaryID>
<SecondaryID>1</SecondaryID>
<MarketingName>tewraewr</MarketingName>
<OwnerLegalName>aerwerwe</OwnerLegalName>
</Identification>
</Property>
</PhysicalProperty>
It used to work fine. However now it gives error
"Non whitespace characters are not allowed in schema elements. Saw 'tewraewr'"
If I remove attributes in PhysicalProperty, it works fine. How can I make it work without removing the attributes?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不是 XML 专家,但如果我不得不猜测,我会认为这是 PhysicalProperty 元素的第二个属性中的空“”。
尝试删除 xsi:noNamespaceSchemaLocation='' 并查看是否有效。
I'm not an XML expert, but if I had to guess I would think it's your empty '' in the second attribute of your PhysicalProperty element.
Try removing the xsi:noNamespaceSchemaLocation='' and see if that works.