Write the <xdr:txBody> element.
504639
def write_tx_body(shape)
      attributes = [
                    [:vertOverflow, "clip"],
                    [:wrap,         "square"],
                    [:lIns,         "27432"],
                    [:tIns,         "22860"],
                    [:rIns,         "27432"],
                    [:bIns,         "22860"],
                    [:anchor,       shape.valign],
                    [:upright,      "1"]
                   ]
      @writer.tag_elements('xdr:txBody') do
        @writer.empty_tag('a:bodyPr', attributes)
        @writer.empty_tag('a:lstStyle')

        @writer.tag_elements('a:p') do
          rotation = shape.format[:rotation] || 0
          rotation *= 60000

          attributes = [
                        [:algn, shape.align],
                        [:rtl, rotation]
                       ]
          @writer.tag_elements('a:pPr', attributes) do
            attributes = [ [:sz, "1000"] ]
            @writer.empty_tag('a:defRPr', attributes)
          end

          @writer.tag_elements('a:r') do
            size = shape.format[:size] || 8
            size *= 100

            bold      = shape.format[:bold]      || 0
            italic    = shape.format[:italic]    || 0
            underline = ptrue?(shape.format[:underline]) ? 'sng' : 'none'
            strike    = ptrue?(shape.format[:font_strikeout]) ? 'Strike' : 'noStrike'

            attributes = [
                          [:lang,     "en-US"],
                          [:sz,       size],
                          [:b,        bold],
                          [:i,        italic],
                          [:u,        underline],
                          [:strike,   strike],
                          [:baseline, 0]
                         ]
            @writer.tag_elements('a:rPr', attributes) do
              color = shape.format[:color]
              if color
                color = shape.palette_color(color)
                color = color.sub(/^FF/, '')  # Remove leading FF from rgb for shape color.
              else
                color = '000000'
              end

              write_a_solid_fill(color)

              font = shape.format[:font] || 'Calibri'
              attributes = [ [:typeface, font] ]
              @writer.empty_tag('a:latin', attributes)
              @writer.empty_tag('a:cs', attributes)
            end
            @writer.tag_elements('a:t') do
              @writer.characters(shape.text)
            end
          end
        end
      end
    end
958057
def simple_write(self, s, frame, node=None):
        """"""
        self.start_write(frame, node)
        self.write(s)
        self.end_write(frame)
1157747
@Override
   public void writeXmlBody(Definition def, Writer out) throws IOException
   {
      writeConnectorVersion(out);

      int indent = 1;
      writeIndent(out, indent);
      out.write("<vendor-name>Red Hat Inc</vendor-name>");
      writeEol(out);
      writeIndent(out, indent);
      out.write("<eis-type>Test RA</eis-type>");
      writeEol(out);
      writeIndent(out, indent);
      out.write("<resourceadapter-version>0.1</resourceadapter-version>");
      writeEol(out);
      writeIndent(out, indent);
      out.write("<resourceadapter>");
      writeEol(out);

      if (def.isUseRa())
      {
         writeIndent(out, indent + 1);
         out.write("<resourceadapter-class>" + def.getRaPackage() + "." +
               def.getRaClass() + "</resourceadapter-class>");
         writeEol(out);
         writeConfigPropsXml(def.getRaConfigProps(), out, indent + 1);
      }

      if (def.isSupportOutbound())
      {
         writeOutbound(def, out, indent + 1);
      }
      if (def.isSupportInbound())
      {
         writeInbound(def, out, indent + 1);
      }

      if (def.isGenAdminObject() && def.getAdminObjects().size() > 0)
      {
         for (int i = 0; i < def.getAdminObjects().size(); i++)
         {
            writeIndent(out, indent + 1);
            out.write("<adminobject>");
            writeEol(out);
            writeIndent(out, indent + 2);
            out.write("<adminobject-interface>" + def.getRaPackage() + "." +
                  def.getAdminObjects().get(i).getAdminObjectInterface() + "</adminobject-interface>");
            writeEol(out);
            writeIndent(out, indent + 2);
            out.write("<adminobject-class>" + def.getRaPackage() + "." +
                  def.getAdminObjects().get(i).getAdminObjectClass() + "</adminobject-class>");
            writeEol(out);
            writeConfigPropsXml(def.getAdminObjects().get(i).getAoConfigProps(), out, indent + 2);
            writeIndent(out, indent + 1);
            out.write("</adminobject>");
            writeEol(out);
         }
      }

      if (def.getSecurityPermissions() != null && def.getSecurityPermissions().size() > 0)
      {
         for (int i = 0; i < def.getSecurityPermissions().size(); i++)
         {
            writeIndent(out, indent + 1);
            out.write("<security-permission>");
            writeEol(out);
            writeIndent(out, indent + 2);
            out.write("<security-permission-spec>" + def.getSecurityPermissions().get(i).getPermissionSpec() +
                  "</security-permission-spec>");
            writeEol(out);
            writeIndent(out, indent + 1);
            out.write("</security-permission>");
            writeEol(out);
         }
      }

      writeIndent(out, indent);
      out.write("</resourceadapter>");
      writeEol(out);
      out.write("</connector>");
      writeEol(out);
   }
786806
public function writeXML( \XMLWriter $w, string $elementName = 'ImageSizeReducer' )
   {

      $w->startElement( $elementName );
      $this->writeXMLAttributes( $w );
      $w->endElement();

   }
890902
public <T> void writeBodyFromObject(T bodyAsObject, Charset charset) {
        @SuppressWarnings("unchecked")
        Class<T> clazz = (Class<T>)bodyAsObject.getClass();
        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
        Writer outputWriter = new OutputStreamWriter(outputStream, charset);

        try {
            Marshaller marshaller = JAXBContext.newInstance(clazz).createMarshaller();
            if (clazz.isAnnotationPresent(XmlRootElement.class)) {
                marshaller.marshal(bodyAsObject, outputWriter);
            } else {
                String tagName = unCapitalizedClassName(clazz);
                JAXBElement<T> element = new JAXBElement<T>(new QName("", tagName), clazz, bodyAsObject);
                marshaller.marshal(element, outputWriter);
            }
        } catch (JAXBException e) {
            throw new RuntimeException(e);
        }

        byte[] bodyContent = outputStream.toByteArray();
        message.contentType(Message.APPLICATION_XML)
                .contentEncoding(charset.name());
        message.body(bodyContent);
    }
1063514
@Override
   public void writeClassBody(Definition def, Writer out) throws IOException
   {

      out.write("public class " + getClassName(def) + " implements ConnectionMetaData");
      writeLeftCurlyBracket(out, 0);
      int indent = 1;

      writeDefaultConstructor(def, out, indent);

      writeEIS(def, out, indent);
      writeUsername(def, out, indent);

      writeRightCurlyBracket(out, 0);
   }
673535
public void writeObject (ObjectOutputStream out)
        throws IOException
    {
        if (!classDefinesElementType()) {
            out.writeUTF(_elementType.getName());
        }
        out.write(_contents);
    }
414349
public void xmlWriteOn(FormattedWriter writer) throws IOException  
  {
    super.xmlWriteOn(writer);
    writer.newLine();
    writer.taggedValue("busName", _busName);
    writer.newLine();
    writer.taggedValue("type", _type);
    writer.newLine();
    writer.taggedValue("userIds", _inboundUserid + "," + _outboundUserid);
  }
416677
private final void _xmlWriteRawOn(FormattedWriter writer, boolean callBackToItem) throws IOException
    {
        new RawDataDumper(_persistentMessageStore, writer, callBackToItem).dump();
    }
1162578
def write_absolute_anchor(index)
      @writer.tag_elements('xdr:absoluteAnchor') do
        # Different co-ordinates for horizonatal (= 0) and vertical (= 1).
        if !ptrue?(@orientation)

          # Write the xdr:pos element.
          write_pos(0, 0)

          # Write the xdr:ext element.
          write_ext(9308969, 6078325)
        else
          # Write the xdr:pos element.
          write_pos(0, -47625)

          # Write the xdr:ext element.
          write_ext(6162675, 6124575)
        end

        # Write the xdr:graphicFrame element.
        write_graphic_frame(index)

        # Write the xdr:clientData element.
        write_client_data
      end
    end
8420
public void write(Writer out)
         throws IOException
    {
        writeHtmlHead(out);
        writeBodyTag(out);
        writeElements(out);
        writeHtmlEnd(out);
    }
409146
def write(self, addr, data):
        '''

        '''
        self.set_addr(addr & 0xfe)
        self.set_data(data)
        self.set_size(len(data))
        self.start()
        while not self.is_ready:
            pass
726259
private static void writeBits(StringBuilder sb, boolean r, boolean w, boolean x) {
        if (r) {
            sb.append('r');
        } else {
            sb.append('-');
        }
        if (w) {
            sb.append('w');
        } else {
            sb.append('-');
        }
        if (x) {
            sb.append('x');
        } else {
            sb.append('-');
        }
    }
9591
def xdr(self):
        
        tx = Xdr.StellarXDRPacker()
        tx.pack_Transaction(self.to_xdr_object())
        return base64.b64encode(tx.get_buffer())
932508
def write(self, fileobj = sys.stdout, indent = u""):
		
		fileobj.write(self.start_tag(indent))
		fileobj.write(u"\n")
		for c in self.childNodes:
			if c.tagName not in self.validchildren:
				raise ElementError("invalid child %s for %s" % (c.tagName, self.tagName))
			c.write(fileobj, indent + Indent)
		if self.pcdata is not None:
			fileobj.write(xmlescape(self.pcdata))
			fileobj.write(u"\n")
		fileobj.write(self.end_tag(indent))
		fileobj.write(u"\n")
764806
public void write(boolean skipNonOverrides,
                      boolean withXMLDeclaration,
                      PrintWriter writer) {

        final String indent = "                           ";

        // header
        if (withXMLDeclaration) {
            writer.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
        }
        writer.println("<" + _CONFIG + " xmlns=\"" + BE_SECURITY.uri + "\"");
        writer.println(indent + " xmlns:xsi=\"" + XSI.uri + "\"");
        writer.println(indent + " xsi:schemaLocation=\"" + BE_SECURITY.uri
                + " " + BE_SECURITY1_0.xsdLocation + "\"");

        // default values
        writer.print(indent);
        write(m_defaultConfig, false, skipNonOverrides, writer);
        writer.println(">");

        // fedoraInternalCall-1 and -2
        writeInternalConfig(1,
                            m_internalSSL,
                            m_internalBasicAuth,
                            m_internalUsername,
                            m_internalPassword,
                            m_internalIPList,
                            writer);
        writeInternalConfig(2,
                            Boolean.FALSE,
                            Boolean.FALSE,
                            null,
                            null,
                            m_internalIPList,
                            writer);

        // sDep roles
        Iterator<String> bIter = m_sDepConfigs.keySet().iterator();
        while (bIter.hasNext()) {
            String role = bIter.next();
            ServiceDeploymentRoleConfig bConfig = m_sDepConfigs.get(role);
            write(bConfig, true, skipNonOverrides, writer);
            // per-method roles
            Iterator<String> mIter = bConfig.getMethodConfigs().keySet().iterator();
            while (mIter.hasNext()) {
                String methodName = mIter.next();
                MethodRoleConfig mConfig =
                        bConfig.getMethodConfigs().get(methodName);
                write(mConfig, true, skipNonOverrides, writer);
            }
        }

        // closing element for entire doc
        writer.println("</" + _CONFIG + ">");
    }
649560
def write(self, fptr):
        
        read_buffer = ET.tostring(self.xml.getroot(), encoding='utf-8')
        fptr.write(struct.pack('>I4s', len(read_buffer) + 8, b'xml '))
        fptr.write(read_buffer)