在学习XML的约束的时候,想自己规范一个约束添加到xml文档中,在xsd文件中指定了xmlns=“http://www.w3.org/2001/XMLSchema”、targetNamespace=
"http://www.test.com/teacher"以及attributeFormDefault="qualified"后,在xml的根元素中添加xmlns、xmlns:xsi、xsi:schemaLocation后,一直提示"Invalid content starting with element {teacher}.one of {teacher} is expected,经过查询发现是在xsd文件中缺少elementFormDefault=”qualified“。
基于IDEA如何将自定义Schema添加到xml文档中
最新推荐文章于 2024-05-27 15:56:14 发布