code: public String serialize()
     {
        //Construct the webservices.xml definitions
        StringBuilder buffer = new StringBuilder();
  
        // header: opening webservices tag
        createHeader(buffer);
  
        // webservice-description subelements
        for (WebserviceDescriptionMetaData wm : webserviceDescriptions)
           buffer.append(wm.serialize());
  
        // closing webservices tag
        buffer.append("</webservices>");
        return buffer.toString();
     }
docs: Serialize as a String