code: function(node, def) {
          var value = def || "";
          if(node) {
              for(var child=node.firstChild; child; child=child.nextSibling) {
                  switch(child.nodeType) {
                      case 3: // text node
                      case 4: // cdata section
                          value += child.nodeValue;
                  }
              }
          }
          return value;
      }
docs: APIMethod: getChildValue
  Get the textual value of the node if it exists, or return an
  optional default string.  Returns an empty string if no first child
  exists and no default value is supplied.
  
  Parameters:
  node - {DOMElement} The element used to look for a first child value.
  def - {String} Optional string to return in the event that no
  first child value exists.
  
  Returns:
  {String} The value of the first child of the given node.