complexType mixed="true"
File: Data.xml <?xml version="1.0"?> <Letter xmlns="http://www.java2s.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation= "http://www.java2s.com Schema.xsd"> <Body> Dear Sirs: This message is <emp> very </emp> useful. </Body> </Letter> File: Schema.xsd <?xml version="1.0"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.java2s.com" xmlns="http://www.java2s.com" elementFormDefault="qualified"> <xsd:element name="Letter"> <xsd:complexType> <xsd:sequence> <xsd:element name="Body" minOccurs="0" maxOccurs="unbounded"> <xsd:complexType mixed="true"> <xsd:sequence> <xsd:element name="emp" type="xsd:string" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema>