Page last modified 17:35, 11 Mar 2013 by Antero

1843

    Table of contents
    No headers

    Version as of 13:00, 18 Sep 2020

    to this version.

    Return to Version archive.

    View current version

    Error description:

    There are at least two causes for this error:

    1: The XML document has content outside of tags and it is defined by the schema that only elements are allowed.

    For example:

    <email>
        Hello Mr. <to>Andersson</to>
        How is your <system>Matrix</system> doing?
        Sincerely Yours, <from>Agent Smith</from>
    </email>

    would produce this error. (It is possible to use XML this way and even validate it by XML schemas by setting complextype attribute mixed="true" but bank materials do not support this.)

    You can add extra content to files by using comments. For example:

    <!-- Here is an email -->
    <email>
        <to>user'at'mail.eu</to> <!-- email address here -->
        <subject>Hello</subject> <!-- remember to use describing subject -->
    </email>

    2: Value is given inside complex type element

    For example

    <InitgPty>
      <Id>givenValue</Id>

    </InitgPty> 

    would give this error because InitgPty/Id is a complex type, thus containing child-elements. A correct use would be

     

    <InitgPty>
      <Id>
        <OrgId>
          <Othr>
            <Id>givenValue</Id>
          </Othr>
        </OrgId>
       </Id>
    </InitgPty>

     

    Explanation of the error message given by the validator:

    "Element 'elem1': Character content other than whitespace is not allowed because the content type is 'element-only'."

    Where elem1 is the element which has content outside of tags and produces the error.

    Menu