Is this XML "valid"?
<?xml version="1.0"?>
<p class="leaders">
Todd
<span class="leader-type">.</span>
R
<span class="leader-type">.</span>
Colas
</p>
I've never seen an XML doc with multiple "values" for a node like this does for the <p>
node.
How do I parse out the three values for <p>
with TXMLDocument? And how to traverse to the <span>
nodes?
Finally...how do I create an XML document like this with TXMLDocument????
Help!!!!
When you say, is it valid, I think you mean: is it well-formed? (We can't tell whether it is valid without a DTD or schema).
Yes, it is well-formed. It is a perfecly normal example of a document containing mixed content, which is what XML is designed for.
I can't answer your questions about TXMLDocument because I've never heard of it: presumably it's part of a delphi XML library.