I keep seeing tags with semicolons like the one below and wonder why they exist?
Whats with the "<journal:journal" part?
Also, in another XML document:
Why not " <tspan space="preserve"></tspan>" without the "xml:" bit? How is it like to parse the above elements? Do you need to do anything special, particularly in JDOM?
Author and all-around good cowpoke
posted 11 years ago
The part before the colon establishes the "namespace" that the tag belongs to. The start of the XML document establishes the namespaces that are in use and how they will be referrd to. Here is a short article on handling namespaces. The fact that you might see a reference to "xml:space" in one document and "space" in another depends on how the document is set up. For example, I am working with the FOP (formatting objects project) fo tags - mixed with XSL tags. By starting the document:
I don't have to write "fo:block" but can use "block" - the "fo:" is default for the document, but I do have to write all xsl tags with "xsl:"
Just another source of confusion - XML has plenty of them. Bill