Subject: Using attributes and elements and text
From: António Mota <amsmota@xxxxxxxxx>
Date: Thu, 24 Feb 2005 17:38:04 +0000
|
I have never see a conclusive definition on when using attributes
instead of elements (besides one that says by using attributes one is
sure that it is a leaf of the tree), and also using text values in
nodes uith childs. Let me put it this way; what are the functional
diferences between these constructs?
<XHoras>
<Assuntos>
<Assunto K="123">
As armas e os barues assinalados
<Detalhes>
<Tipo>0</Tipo>
<Detalhe/>
</Detalhes>
</Assunto>
</Assuntos>
</XHoras>
<XHoras>
<Assuntos>
<Assunto>
<K>123</K>
As armas e os barues assinalados
<Detalhes>
<Tipo>0</Tipo>
<Detalhe/>
</Detalhes>
</Assunto>
</Assuntos>
</XHoras>
<XHoras>
<Assuntos>
<Assunto>
<K>123</K>
<Desc>
As armas e os barues assinalados
</Desc>
<Detalhes>
<Tipo>0</Tipo>
<Detalhe/>
</Detalhes>
</Assunto>
</Assuntos>
</XHoras>
|