Learn xml for web design...
by barkkathulla[ Edit ] 2012-09-22 11:47:23
LIKE MOST GOOD IDEAS,XML IS BASICALLY A VERY SIMPLE IDEA THAT CAN BE PUT TO GOOD USE IN MANY SITUATIONS.IT IS NOT INTENDED TO BE A DIRECT REPLACEMENT FOR THE GENERAL-PURPOSE MARKUP THAT IS PROVIDED BE HTML DESCRIBING HOW CONTENT SHOULD BE DISPLAYED.INSTEAD XML OFFERS A MEANS TO DEFINE AND CONSTRUCT OTHER CUSTOM MARKUP LANGUAGES WITH TAGS YOU NAME YOUR SELF AND RULES WHICH YOU DEFINE FOR HOW THOSE TAGS CAN BE USED. SO BECAUSE XML IS A LANGUAGE THAT DESCRIBES OTHER LANGUAGES IT IS TERMED AS BEING A âАШMETA-LANGUAGEâАЩ.
TAG FORMAT
XML ELEMENT TAGS LOOK MUCH LIKE THOSE YOU SEE IN HTML BUT,UNLIKE HTML,THERE ARE NOT PREDEFINED ELEMENTS.GREATER CARE MUST BE TAKEN WITH XML ELEMENTS TO ENSURE THAT THEY ADHERE TO STRICT SYNTAX RULES TO MAKE THE XML DOCUMENTS WELL-FORMED.
CASE-SENSITIVE
XML IS A CASE SENSITIVE LANGUAGE.SO FOR INSTANCE THE-TAGS <CITY>,<CITY>AND<CITY>ARE CONSIDERED TO BE THREE SEPARATE UNRELATED ELEMENTS IN XML.IT IS RECOMMENDED THAT YOU USE ONLY LOWERCASE FOR ELEMENT NAMES TO AVOID CONFUSION.
THE XML DECLARATION
THE START OF THE VERY FIRST LINE OF EVERY XML DOCUMENT SHOULD CONTAIN THE XML DECLARATION.THIS IDENTIFIES THE DOCUMENT TO BE A XML DOCUMENT AND DEFINES THE VERSION OF XML BEING USED.
THE XML DECLARATION IS STATED IN A SPECIAL TAG THAT STARTS âАШ<? AND ENDS âАШ?>âАЩ TO DENOTE THAT IT CONTAINS A PROCESSING INSTRUCTION.THIS TYPE OF TAG CAN ALSO BE USED TO STATE OTHER PROCESSING INSTRUCTIONS SUCH AS SPECIFYING THE STYLE SHEET THAT IS TO BE USED WITH THAT XML DOCUMENT.
THE XML DECLARATION MAY INCLUDE AN ATTRIBUTE CALLED âАШSTANDALONEâАЩ TO SPECIFY IF THAT DOCUMENT USES OTHER DOCUMENTS. THIS ATTRIBUTE CAN ONLY HAVE A VALUE OF EITHER âАШYESâАЩ OR âАШNOâАЩ.MOST XML DOCUMENTS USE OTHER FILES,SUCH AS A STYLE SHEET AND SCHEMA,BUT COMPLETELY INDEPENDENT XML DOCUMENTS MIGHT START WITH THIS DECLARATION.
<?XML VERSION=âАЭ1.0âАЭ STANDALONE=âАЭYESâАЭ?>