BoulderBum
Programmer
I have a schema that contains a subset of XML elements:
Everything works great except for one detail: I don't know the notation for allowing text to be inside the root element with all the other elements.
In other words, while this works:
This currently does not:
How exactly do I define "root" so that it allows text along with the other elements?
Code:
<xs:element name="root">
<xs:complexType>
<xs:group ref="elements" minOccurs="0" maxOccurs="unbounded"/>
</xs:complexType>
</xs:element>
Everything works great except for one detail: I don't know the notation for allowing text to be inside the root element with all the other elements.
In other words, while this works:
Code:
<root>
<b>bolded</b>
<br/>
<p>
<ul>
<li>
<b>test</b>
</li>
</ul>
</p>
</root>
This currently does not:
Code:
<root>
Here is text that makes the schema validation fail.
<b>bolded</b>
<br/>
<p>
<ul>
<li>
<b>test</b>
</li>
</ul>
</p>
</root>
How exactly do I define "root" so that it allows text along with the other elements?