User Tools

Site Tools


tanszek:oktatas:techcomm:xml_2

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
tanszek:oktatas:techcomm:xml_2 [2024/10/07 17:26] – [XML Example] kneheztanszek:oktatas:techcomm:xml_2 [2024/10/07 17:30] (current) – [XML Namespaces] knehez
Line 72: Line 72:
  
 In this example, the namespace prefix ''unimiskolc'' is defined to avoid name conflicts, and it links the data to the **www.uni-miskolc.hu** namespace. In this example, the namespace prefix ''unimiskolc'' is defined to avoid name conflicts, and it links the data to the **www.uni-miskolc.hu** namespace.
 +
 +==== XML Interpreters ====
 +
 +**XML interpreters** process XML documents by performing **syntactic validation**.
 +
 +=== Definition ===
 +An XML document is considered **"well-formed"** if it is **syntactically flawless**.
 +
 +This means:
 +- It has a **single root element**.
 +
 +- Every opening tag has a corresponding closing tag.
 +
 +- The attributes are properly specified.
 +
 +Therefore, the term **"well-formed"** does not refer to the visual formatting of the XML file with tabs, spaces, or its human-readable structure!
 +
 +=== Example ===
 +
 +<sxh xml>
 +<root><element>abc</element><a>this worng<b></root>
 +</sxh>
 +
 +This XML is **syntactically incorrect** because the `<a>` tag is not closed.
 +
 +=== Example ===
 +
 +The following example is neatly formatted but still **not well-formed**:
 +
 +<sxh xml>
 +<CONTACT>
 +   <NAME>Frank Lee</NAME>
 +   <EMAIL>flee@flee.com
 +</CONTACT>
 +</sxh>
 +
 +Here’s the correct version:
 +
 +<sxh xml>
 +<CONTACT>
 +   <NAME>Frank Lee</NAME>
 +   <EMAIL>flee@flee.com</EMAIL>
 +</CONTACT>
 +</sxh>
 +
 +What’s the difference? In the incorrect version, the `<EMAIL>` tag is not closed, causing the document to be invalid, even though it is visually well-structured.
tanszek/oktatas/techcomm/xml_2.1728321992.txt.gz · Last modified: 2024/10/07 17:26 by knehez