26 Matching Annotations
  1. Mar 2020
    1. in XML the ordering of elements is significant. Whereas in JSON the ordering of the key-value pairs inside objects is meaningless and undefined

      XML vs JSON (ordering elements)

    2. XML is a document markup language; JSON is a structured data format, and to compare the two is to compare apples and oranges

      XML vs JSON

    3. dictionary (a piece of structured data) can be converted into n different possible documents (XML, PDF, paper or otherwise), where n is the number of possible permutations of the elements in the dictionary

      Dictionary

    4. The correct way to express a dictionary in XML is something like this

      Correct dictionary in XML:

      <root>
        <item>
          <key>Name</key>
          <value>John</value>
        </item>
        <item>
          <key>City</key>
          <value>London</value>
        </item>
      </root>
      
    5. Broadly speaking, XML excels at annotating corpuses of text with structure and metadata

      The right use of XML

    6. XML has no notion of numbers (or booleans, or other data types), any numbers represented are just considered more text

      Numbers in XML

    7. To date, the only XML schemas I have seen which I would actually consider a good use of XML are XHTML and DocBook

      Good use of XML

    1. JSON’s origins as a subset of JavaScript can be seen with how easily it represents key/value object data. XML, on the other hand, optimizes for document tree structures, by cleanly separating node data (attributes) from child data (elements)

      JSON for key/value object data

      XML for document tree structures (clearly separating node data (attributes) from child data (elements))

    2. The advantages of XML over JSON for trees becomes more pronounced when we introduce different node types. Assume we wanted to introduce departments into the org chart above. In XML, we can just use an element with a new tag name
    3. JSON is well-suited for representing lists of objects with complex properties. JSON’s key/value object syntax makes it easy. By contrast, XML’s attribute syntax only works for simple data types. Using child elements to represent complex properties can lead to inconsistencies or unnecessary verbosity.

      JSON works well for list of objects with complex properties. XML not so much

    4. UI layouts are represented as component trees. And XML is ideal for representing tree structures. It’s a match made in heaven! In fact, the most popular UI frameworks in the world (HTML and Android) use XML syntax to define layouts.

      XML works great for displaying UI layouts

    5. XML may not be ideal to represent generic data structures, but it excels at representing one particular structure: the tree. By separating node data (attributes) from parent/child relationships, the tree structure of the data shines through, and the code to process the data can be quite elegant.

      XML is good for representing tree structured data

  2. Feb 2020
    1. The lack of a dynamic scripting language is annoying, though Tsung XML scenarios (again, just like JMeter) can include things like loops and if-statements, so it is actually possible to write all sorts of complicated user scenario “code.” The functionality is there, but the usability is not: few developers like “programming” in XML.
  3. Jan 2020
  4. May 2019
  5. Apr 2019
  6. Mar 2017
    1. <category>examples &gt; example1</category>

      This example is misleading! I'll try to make this clearer.

      1. ">" should never be used ">" should be used in its place.
      2. There should be no spaces between the category name and ">". If you put spaces in, category assigment via bulk XML upload will not work.
  7. Jul 2016
    1. childNodes[0] - the first child of the <title> element (the text node)

      There are no nested childnodes beneath it, so of course the title element is the only one. So choose the first. If there was an element nested beneath it, then childNodes[1] would be functional.

  8. Sep 2015
    1. JATS for Reuse (JATS4R) was formed to provide guidelines and tools to standardise the use of the NISO standard Journal and Archiving Tag Set (JATS) for tagging XML in publishing workflows.

    Tags

    Annotators

    URL