6
मैं निम्नलिखित XSD से एक प्रमाणीकरण त्रुटि हो रही है:XSD त्रुटि: चरित्र सामग्री की अनुमति नहीं है क्योंकि सामग्री प्रकार खाली है
<?xml version="1.0" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="People">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Person" maxOccurs="unbounded">
<xsd:complexType>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
जब निम्न XML का उपयोग मान्य करने के लिए:
<?xml version="1.0" ?>
<People>
<Person name='john'>
a nice person
</Person>
<Person name='sarah'>
a very nice person
</Person>
<Person name='chris'>
the nicest person in the world
</Person>
</People>
रिटर्न निम्न त्रुटि:
lxml.etree.XMLSyntaxError: Element 'Person': Character content is not allowed, because the content type is empty.
मैं क्या याद आ रही है?
क्या मैं (एक्सएमएल में तार जोड़ने के लिए XSD को जोड़ने की जरूरत है के तहत कर व्यक्ति तत्व)? – Russell
मेरी पोस्ट संपादित की गई। कृपया जांचें। –