Benvenuti su "Just a Bit of.. Entropy!".
Questo blog tratta di Free Software e programmazione.
L'autore è un di membro di Guru@Work
e studente del corso di laurea specialistica in
Tecnologie Informatiche all'università di Pisa.
XML Well-Formed

Perché mai un post sulla “formattazione” corretta di un documento XML?
Perché alle volte è bene avere presenti questi particolari, soprattutto per non farsi male quando si vanno ad utilizzare parser vari ed eventuali..
Un documento XML si dice well-formed (ed è quindi analizzabile da un parser) se:
“
- Non-empty elements are delimited by both a start-tag and an end-tag.
- Empty elements may be marked with an empty-element (self-closing) tag, such as
<IAmEmpty />. This is equal to<IAmEmpty></IAmEmpty>. - All attribute values are quoted with either single (’) or double (”) quotes. Single quotes close a single quote and double quotes close a double quote.
- Tags may be nested but must not overlap. Each non-root element must be completely contained in another element.
- The document complies with its declared character encoding. The encoding may be declared or implied externally, such as in “Content-Type” headers when a document is transported via HTTP, or internally, using explicit markup at the very beginning of the document. When no such declaration exists, a Unicode encoding is assumed, as defined by a Unicode Byte Order Mark before the document’s first character. If the mark does not exist, UTF-8 encoding is assumed.
- Element names are case-sensitive.
“
(Tratto da Wikipedia)
Continua a leggere
Blog realizzato da Giulio Rossetti.
Immagine presente nell'header realizzata da bunocb e disponibile sul sito crystalxp





































