File talk:XML.svg

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
WikiProject iconComputing File‑class
WikiProject iconThis file is within the scope of WikiProject Computing, a collaborative effort to improve the coverage of computers, computing, and information technology on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
FileThis file does not require a rating on Wikipedia's content assessment scale.
WikiProject iconInternet File‑class
WikiProject iconThis file is within the scope of WikiProject Internet, a collaborative effort to improve the coverage of the Internet on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
FileThis file does not require a rating on Wikipedia's content assessment scale.

icon content[edit]

The xml in this icon is not well formed. should be more along the lines of <problem><question /> <answer /></problem> —Preceding unsigned comment added by 74.202.89.125 (talk) 19:32, 4 February 2008 (UTC)[reply]

It is well-formed. You're right that it would make more sense to wrap the <question> and <answer> elements in a separate <problem> element when you start adding more questions, but nothing in XML compels you to do that. You could add a new <giraffe> element after <answer> and it would still be valid, well-formed XML. 82.95.254.249 (talk) 21:28, 18 August 2008 (UTC)[reply]
Contextually it is bad. Since in this instance, there is no coupling of "question" with "answer", so the two are logically disjoint. Since with XML you relate entities in subsets, you would use a main element for the question, and sub-elements for the question text and it's answer.

In this SVG, it asserts that <question> and <answer> are independent of eachother. At first glance it appears trivial, but later you realise:

  1. How can you distinguish each question's answer?
  2. If I give question and answer an attribute, i.e "muffin=blue" to link the two, why not just reduce complexity and give the parent element "muffin=blue"?

So, in other words. The guy at the top is CORRECT. The guy below him is wrong. —Preceding unsigned comment added by 81.138.133.197 (talkcontribs)

Well no, I'm not. The point is that well-formed has a clearly defined meaning in the context of XML, see XML#Well-formedness. Is the document show in the SVG well-formed? Yes. Well-formedness is a very weak demand. (I did make a mistake saying the XML is "valid" -- it's not, validity also has a specific meaning and it involves having a DTD or schema, which this document doesn't have.)
If this document was used in real life to provide a list of questions with answers, it probably wouldn't be done like this -- that's true. However, even in this case it's very easy to come up with an interpretation which makes sense: all <answer> elements belong to the last seen <question> element. Order of elements is significant in XML, so this works. XML doesn't say how to interpret the document, it just allows you to lay down a tree structure. This is a questionable design and it's easy to come up with a better one, but it's not in any way malformed.
So again: this document is well-formed, it's just not as sensible as it could be. If anyone wants to step up and replace it with a more sensible alternative so we can avoid discussions like this in the first place, feel free... 82.95.254.249 (talk) 14:46, 1 June 2009 (UTC)[reply]


paba[edit]

  <title>2008-10-14</title> 
<location>http://cdn.splashcast.net/assets/01/video/import-567131.flv</location> 
<meta rel="type">flv</meta> 
</track>
</trackList>
</playlist>

Better XML sturcture image[edit]

I created a new file with better XML structure but can't upload it - Not sure if this is an issue with my permissions or that the name "xml.svg" has been blacklisted.

Add caption here

--Akademy (talk) 12:44, 21 January 2013 (UTC)[reply]