mathieu a écrit :
'lo there !
I am a complete newbie in XML and I am pretty sure my question does
not make a lot of sense but here it goes anwyay.
Are there any real differences in between:
<entry group="0000" element="0850" vr="US" vm="1" retired="true"
version="2">
<name>Number of Matches</name>
</entry>
and
<entry group="0000" element="0850" vr="US" vm="1" retired="true"
version="2" name="Number of Matches"/>
I picked the first solution since 'name' could potentially contains
non-ASCII characters,
this is irrelevant since XML relies on Unicode
double quotes or single quote.
quotes can be escaped ; the more often, strings that contains single
quotes are double-quoted, and strings that contains double quotes are
single-quoted ; strings that contain both must escape those used as
delimiter ; however if the content of your attribute is created by a
tool (XML editor, database extraction or whatever) this is a syntax
consideration that should be transparent
It is garantee
that there is at most one 'name' per 'entry'. name can sometimes be
unknown. name is typically a very short string, so does this still
make sense to put it in the character data ?
yes, if you decide it ; but IMHO, an attribute is suitable to your case
you could also consider this one :
<entry group="0000" element="0850" vr="US" vm="1" retired="true"
version="2">Number of Matches</entry>
>
Thanks for comments
-Mathieu
--
Cordialement,
///
(. .)
--------ooO--(_)--Ooo--------
| Philippe Poulard |
-----------------------------
http://reflex.gforge.inria.fr/
Have the RefleX !