code: function fromXML($xmlElement)
      {
          foreach ($xmlElement->children() as $field) {
              $this->custom_fields[trim($field->name)] = $field->type; // The trim is required to make a safer string from the object
          }
      }
docs: Initialization of the custom fields from a simple xml element.
  
  @param SimpleXMLElement $xmlElement
  The xml element that is used to parse the custom fields from.