I see there are plenty of similar threads here but I believe I have a unique twist to the problem so bear with me, please.
I'm trying to upload an XML file that contains a form to a webpage. To make things simple, I downloaded a previous form from the webpage and simply changed the values to make an update, then tried to upload this form with fresh values. I get an error 'The 'St-P3' Element is not declared'. I downloaded the XSD schema from the webpage and inputted it into an XML validator along with my XML file. As expected, I get 'Cannot Find The Declaration Of Element "St-P3"' error.
So I'm guessing that the XSD schema is somehow flawed, even though I searched through it manually and found the declaration of said element. (Note: it's not just one element. I actually have several files to upload and every one gives me the same error for different names of the head element.) The problem is I can't correct the schema and upload it to the webpage; I can only upload XML files.
My question is: can I type a declaration of an element into my XML file to compensate for the flawed XSD schema? Or do I have the wrong assumption? Could the schema be correct and my file might be false, even though I used a downloaded previous file with identical tags to make a new file?
My XML file looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<St-P3 type="group">
...
[Other groups and items]
...
</St-P3>
The XSD schema is pretty large but contains the declaration of the 'St-P3' element:
<xs:element minOccurs="0" maxOccurs="1" name="St-P3">
<xs:complexType>
<xs:all>
...
[Declarations of other elements]
...
</xs:all>
<xs:attribute default="group" name="type" />
</xs:complexType>
</xs:element>
I hope someone can help me with this. Thanks.
No comments:
Post a Comment