code: private void addElement(Document document, Element parentElement, String elementName, Object elementValue)
      {
          Element element = CollectionExtensionPropertySerializer.toElement(elementValue, document, elementName,
              this.serializerByClass);
  
          if (element != null) {
              parentElement.appendChild(element);
          }
      }
docs: Tools