The "parse XML activity" always throws the following error: "A validation occurred while parsing:validation error: text not allowed in empty content."

The "parse XML activity" always throws the following error: "A validation occurred while parsing:validation error: text not allowed in empty content."

book

Article ID: KB0088130

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks -
Not Applicable -

Description

Resolution:
Environment:
==========
Business Works: 5.7.0
OS: All

Resolution:
=========
This is caused by the usage of the complexContent tag.

Example:

<xsd:complexType name="SequencedTextType">
        <xsd:complexContent>
            <xsd:extension base="TextType">
...

The complexContent has an attribute named "mixed". The meaning of mixed is:

    mixed : Optional. Specifies whether character data is allowed to appear between the child elements of this complexType element. Default is false.
    For more info about complexContent, please refer to http://www.w3schools.com/schema/el_complexcontent.asp.

So mixed="false"  means it does not allow character data. Then the error, "text not allowed in empty content" is expected.

To fix this error, you can replace the complexContent with simpleContent if the complexType to be defined has only attributes and character data and no child element. Or you can add attribute mixed="true" to the complexContent tag if the complexType has attributes and a character data and child element.

Issue/Introduction

The "parse XML activity" always throws the following error: "A validation occurred while parsing:validation error: text not allowed in empty content."