Bir XSD'ye karşı doğrulamak istediğim basit bir XML dosyası aldım. Bunun için LookingXSD'ye karşı XML doğrulanırken hata oluştu
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://schemas.testxyzxyz.de/xyz/BusinessModel"
xmlns="http://schemas.testxyzxyz.de/xyz/BusinessModel">
<xsd:element name="BusinessModel" type="BusinessModelType" />
<xsd:complexType name="BusinessModelType">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="Entities" type="EntitiesType" />
</xsd:choice>
</xsd:complexType>
<xsd:complexType name="EntitiesType">
<xsd:sequence>
<xsd:element name="Entity" type="EntityType" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="AttributeType">
<xsd:attribute name="Name" type="xsd:string" use="required" />
<xsd:attribute name="Type" type="xsd:string" use="required" />
</xsd:complexType>
<xsd:complexType name="EntityType">
<xsd:sequence>
<xsd:element name="Attribute" type="AttributeType" maxOccurs="unbounded" minOccurs="1" />
</xsd:sequence>
<xsd:attribute name="Name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:schema>
: Burada
XML var:Invalid content was found starting with element 'Entities'. One of '{Entities}' is expected.
<BusinessModel xmlns="http://schemas.testxyzxyz.de/xyz/BusinessModel" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Entities>
<Entity Name="Customer">
<Attribute Name="Forename" Type="String" />
<Attribute Name="Surname" Type="String" />
<Attribute Name="Birthday" Type="Date" />
</Entity>
</Entities>
</BusinessModel>
yanı sıra XSD bazı rasgele doğrulayıcı ile doğrulamak zaman , hep aşağıdaki hatayı alıyorum saatten beri sorun ve hala bir hata bulamıyorum. Bana doğru yönü gösterir misin? ;)
Teşekkürler, bu sorunu çözdü :) –