Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>If you're loading it into memory, it doesn't really matter what form the XML takes - make it the easiest to read or write by hand, I would suggest. When you load it into memory, <em>then</em> you should transform it into an appropriate data structure. (The exact nature of the data structure would depend on the exact nature of the requirements.)</p> <p>EDIT: This is to counter the arguments made in comments by Dimitre:</p> <p>I'm not sure whether you thought I was suggesting that people implement their own hashtable - I certainly wasn't. Just keep a straight hashtable or perhaps a <a href="http://google-collections.googlecode.com/svn/trunk/javadoc/com/google/common/collect/Multimap.html" rel="nofollow noreferrer">MultiMap</a> for each column which you want to use as a key. Developers know how to use hashtables.</p> <p>As for the runtime efficiency, which do you think is going to be more efficient:</p> <ul> <li>You build some XSLT (and bear in mind this <em>is</em> foreign territory, at least relatively speaking, for most developers)</li> <li>XSLT engine parses it. This step <em>may</em> be avoidable if you're using an XSLT library which lets you just parameterise an existing query. Even so, you've got <em>some</em> extra work to do.</li> <li>XSLT engine hits hashtables (you hope, at least) and returns a node</li> <li>You convert the node into a more useful data structure</li> </ul> <p>Or:</p> <ul> <li>You look up appropriate entries in your hashtable based on the keys you've been given, getting straight to a useful data structure</li> </ul> <p>I think I'd trust the second one, personally. Using XSLT here feels like using a screwdriver to bash in a nail...</p>
 

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