A “Well Formed” XML document has correct XML syntax and follows XML rules for naming elements, attributes etc. |
A “Well Formed” XML document is a document that conforms to the XML syntax rules, i.e.: |
• XML tags are case sensitive |
• XML documents must have a root element, only one root element is allowed per file. |
• XML elements must be closed, means they must have a closing tag. |
• XML elements must be properly nested |
• XML attribute values must always be quoted |
<?xml version=”1.0″ encoding=”ISO-8859-1″?> <email> <sender> <sender_name>XYZ Kumar</sender_name> <sender_email_id>[email protected]</sender_email_id> </sender> <recipient> <recipient_name>ABC</recipient_name> <recipient_email_id>[email protected]</recipient_email_id> </recipient> <subject>Hello! how r U</subject> <message> <message_header>Hello dear</message_header> <message_body_text>Hello this is Ravish, how are you dear</message_body_text> <message_footer>bye!, take care</message_footer> </message> </email> |