Reputation: 5660
For example, assume that we have an element "car" which contains child elements like color, wheels etc each with its own text eg: color: red and wheel four. But can "car" itself contain text like BMW ?
Upvotes: 0
Views: 34
Reputation: 56202
Yes, it is allowed and XML will be well-formed. Anyway, you should avoid doing so if possible.
Upvotes: 1
Reputation: 31620
Yes. It's called mixed content e.g.:
<root>
<element>abc<child>xyz</child>def<child>nop</child>hij</element>
</root>
is valid xml.
Upvotes: 1