code: public UNode toDoc() {
          // The root node is a MAP, but we set its tag name to "table" for XML.
          UNode tableNode = UNode.createMapNode(m_tableName, "table");
          
          // Add options, if any.
          if (getOptionNames().size() > 0) {
              // Options node is a MAP. 
              UNode optsNode = tableNode.addMapNode("options");
              for (String optName : getOptionNames()) {
                  // Set the tag name of each option to "option" for XML.
                  optsNode.addValueNode(optName, getOption(optName), "option");
              }
          }
          
          // Add fields, if any.
          if (m_fieldDefMap.size() > 0) {
              // Fields node is a MAP. 
              UNode fieldsNode = tableNode.addMapNode("fields");
              
              // Add definitions of outer (non-nested) fields only. Each group field will
              // recurse to its nested fields.
              for (FieldDefinition fieldDef : m_fieldDefMap.values()) {
                  if (!fieldDef.isNestedField()) {
                      fieldsNode.addChildNode(fieldDef.toDoc());
                  }
              }
          }
  
          // Add "aliases", if any.
          if (m_aliasDefMap.size() > 0) {
              // Aliases node is a MAP. 
              UNode aliasesNode = tableNode.addMapNode("aliases");
              for (AliasDefinition aliasDef : m_aliasDefMap.values()) {
                  aliasesNode.addChildNode(aliasDef.toDoc());
              }
          }
          
          return tableNode;
      }
docs: Serialize this table definition into a {@link UNode} tree and return the root node.
  
  @return  The root node of a {@link UNode} tree for this table definition.