xsd - Create an XML Schema for an unlimited number of unordered elements in a mixed element -


I am trying to create an XML schema that is the element and the litt; Content & gt; & Lt; A & gt;, & lt; B & gt; With an unlimited number of & lt; C & gt; In any order the element will be an example XML below.

  & lt; Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Article xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi: Any namespace location = "article.xsd" & gt; & Lt; Content & gt; Website & lt; A & gt; Ipsum & lt; / A & gt; Dollar seat amate, Persector adipiscing elite nalla rhoncus & lt; B & gt; Laureate Nek & lt; / B & gt; AC Molise & Lt; A & gt; Employee & lt; / A & gt; ERT & lt; C & gt; Voltapat & lt; / C & gt; After moving forward, I can find a place & lt; / Content & gt; & Lt; / Article & gt;  

I think it is difficult to allow any number of those elements in any order.

You have to use a mixed content type. Their details are easy to understand

Something like this:

   & Lt; Xs: element name = "b" type = "x: string" /> & Lt; Xs: element name = "c" type = "x: string" /> & Lt; / Xs: Options & gt; & Lt; / XS: complexType & gt; & Lt; / XS: element & gt;  

To note, part is mixed = "true" , which allows text to appear between elements.


Comments