Invalid content was found starting at the metamug element

I am getting the following error when trying to save a resource file

Invalid content was found starting with element '{"http://xml.metamug.net/resource/1.0":update}'. One of '{"http://xml.metamug.net/resource/1.0":Desc, "http://xml.metamug.net/resource/1.0":Param, "http://xml.metamug.net/resource/1.0":Execute, "http://xml.metamug.net/resource/1.0":Query, "http://xml.metamug.net/resource/1.0":Update}' is expected.

      

This is the resource file I am using.

<?xml version="1.0" encoding="UTF-8" ?>
<Resource xmlns="http://xml.metamug.net/resource/1.0" v="1.0">
    <Request method="POST">
        <Desc> CRICKET INFO </Desc>
        <update>
          insert into CRICKET (NAME,DOB,BATTING_STYLE,BOWLING_STYLE,TEAMS)
          values($xname,$dob,$batstyle,$bowlstyle,$comment); 
      </update>
    </Request>
</Resource>

      

+3


source to share


1 answer


Your tag update

should be in the "Title" field. Virtually all tags in the metamuja resource file are located at the top. So do this update

and it will work with the file. This is what the error indicates.

xml is checked against the xsd schema which can be found here .



If you are using an editor familiar with schema (eg Eclipse, Netbeans). This will help you auto-complete the xml tags and attribute and provide in-place validation.

<Resource xmlns="http://xml.metamug.net/resource/1.0"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://xml.metamug.net/resource/1.0 http://xml.metamug.net/schema/resource.xsd" 
 v="1.0">
    <Request method="POST">
        <Desc> CRICKET INFO </Desc>
        <Update>
          insert into CRICKET (NAME,DOB,BATTING_STYLE,BOWLING_STYLE,TEAMS)
          values($xname,$dob,$batstyle,$bowlstyle,$comment); 
      </Update>
    </Request>
</Resource>

      

+2


source







All Articles