Menu

Can Someone help me with this problem?

Help
2019-11-15
2019-11-16
  • Gery Manson

    Gery Manson - 2019-11-15

    Whenever I am trying to validate my XML-Schema or my XML-File XML Copy Edior says no declaration found for element 'xs:schema'

    Code for PODCAST.xsd:

    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementformdefault="qualified"> <xs:element name="podcast"> <xs:complextype name="podcast"> <xs:sequence> <xs:element maxoccurs="unbounded" type="xs:string" name="episode" minoccurs="0"> <xs:complextype name="episode"> <xs:element name="host"> <xs:element name="guest"> <xs:element name="chapter"> </xs:element> </xs:element> </xs:element> </xs:complextype> </xs:element></xs:sequence> </xs:complextype> </xs:element> </xs:schema>

    and the following file: podcast-project.xml

    <podcast xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://www.meinpodcast.de/" xsi:schemalocation="https://www.meinpodcast.de/ PODCAST.xsd"> <episode> <host> </host> <guest> </guest> <chapter></chapter> </episode> </podcast>
     
  • Zane U. Ji

    Zane U. Ji - 2019-11-16

    You don't have to validate a schema alone. When an XML file is validated, the shcema will be loaded first. If there is any problems in the schema, error messages will be displayed, however, below the content of the XML file rather than that of the shcema file.

     

Log in to post a comment.