• # Quelques éléments de réponses

    Posté par . En réponse au message besoin de conseil pour la conception de fichier XML. Évalué à 4.

    Enfait, comme dit plus haut, y'a pas vraiment de règle, mais j'ai trouvé ça : http://www.w3schools.com/xml/xml_attributes.asp(...) où il est dit ceci : Use child elements if the information feels like data. Et plus loin (qui est sûrement plus déterminant dans tes choix) : Some of the problems with using attributes are:
    • attributes cannot contain multiple values (child elements can)
    • attributes are not easily expandable (for future changes)
    • attributes cannot describe structures (child elements can)
    • attributes are more difficult to manipulate by program code
    • attribute values are not easy to test against a Document Type Definition (DTD) - which is used to define the legal elements of an XML document
    (...)
    En espérant que ça t'aidera à faire tes choix....