Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It's not essential, but advisable. However, if string manipulation works for you, then go for it! There are plenty of cases where small or simple XML text can be safely built by hand.</p> <p>Just be aware that creating XML text is harder than it looks. Here's some criteria I would consider:</p> <ul> <li>First: how much <em>control</em> do you have on the information that goes into the xml?</li> </ul> <p>The less control you have on the source data, the more likely you will have trouble, and the more advantageous the library becomes. For example: (a) Can you <em>guarantee</em> that the element names will never have a character that is illegal in a name? (b) How about quotes in an attribute's content? Can they happen, and are you handling them? (c) Does the data ever contain anything that might need to be encoded as an <a href="http://en.wikipedia.org/wiki/XML_entity" rel="nofollow noreferrer">entity</a> (like the less-than which often needs to be output as <strong>&amp;lt;</strong>); are you doing it correctly?</p> <ul> <li>Second, maintainability: is the code that builds the XML easy to understand <em>by someone else</em>?</li> </ul> <p>You probably don't want to be stuck with the code for life. I've worked with second-hand C++ code that hand-builds XML and it can be surprisingly obscure. Of course, if this is a personal project of yours, then you don't need to worry about "others": substitute "in a year" for "others" above.</p> <p>I wouldn't worry about performance. If your XML is simple enough that you can hand-write it, any overhead from the library is probably meaningless. Of course, your case might be different, but you should measure to prove it first.</p> <p>Finally, Yes; you can hand build XML text by hand if it's simple enough; but not knowing the libraries available is <em>probably</em> not the right reason.</p> <p>A modern XML library is a quite powerful tool, but it can also be daunting. However, learning the essentials of your XML library is not that hard, and it can be quite handy; among other things, it's almost a requisite in today's job marketplace. Just don't get bogged down by namespaces, schemas and other fancier features until you get the essentials.</p> <p>Good luck.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload