Write this source to an XML node.
165287
def write_xml(self, root):
        """"""

        if not self.extended:
            try:
                source_element = utils.create_xml_element(root, 'source',
                                                          dict(name=self['Source_Name'],
                                                               type='PointSource'))
            except TypeError as msg:
                print (self['Source_Name'], self)
                raise TypeError(msg)

            spat_el = ElementTree.SubElement(source_element, 'spatialModel')
            spat_el.set('type', 'SkyDirFunction')

        elif self['SpatialType'] == 'SpatialMap':
            source_element = utils.create_xml_element(root, 'source',
                                                      dict(name=self['Source_Name'],
                                                           type='DiffuseSource'))

            filename = utils.path_to_xmlpath(self['Spatial_Filename'])
            spat_el = utils.create_xml_element(source_element, 'spatialModel',
                                               dict(map_based_integral='True',
                                                    type='SpatialMap',
                                                    file=filename))
        else:
            source_element = utils.create_xml_element(root, 'source',
                                                      dict(name=self['Source_Name'],
                                                           type='DiffuseSource'))
            spat_el = utils.create_xml_element(source_element, 'spatialModel',
                                               dict(type=self['SpatialType']))

        for k, v in self.spatial_pars.items():
            utils.create_xml_element(spat_el, 'parameter', v)

        el = ElementTree.SubElement(source_element, 'spectrum')

        stype = self['SpectrumType'].strip()
        el.set('type', stype)

        if self['Spectrum_Filename'] is not None:
            filename = utils.path_to_xmlpath(self['Spectrum_Filename'])
            el.set('file', filename)

        for k, v in self.spectral_pars.items():
            utils.create_xml_element(el, 'parameter', v)
1136165
@Override
    public final void xmlWriteRawOn(FormattedWriter writer, boolean callbackToItem) throws IOException
    {
        synchronized (_startLock)
        {
            if (_state == MessageStoreState.STATE_STARTED)
            {
                _xmlWriteRawOn(writer, callbackToItem);
            }
            else
            {
                writer.startTag(XML_MESSAGE_STORE);
                writer.indent();
                writer.newLine();
                writer.write(XML_CANNOT_BE_WRITTEN);
                writer.outdent();
                writer.newLine();
                writer.endTag(XML_MESSAGE_STORE);
            }
        }
    }
399673
def _write_xml(xmlfile, srcs):
        
        root = ElementTree.Element('source_library')
        root.set('title', 'source_library')

        for src in srcs:
            src.write_xml(root)

        output_file = open(xmlfile, 'w')
        output_file.write(utils.prettify_xml(root))
505534
def to_xml(self):
        """"""
        element = etree.Element(self._tag_name)
        struct_to_xml(element, [
            {"text": self.raw_content},
            {"guid": self.guid},
            {"author": self.handle},
            {"public": "true" if self.public else "false"},
            {"created_at": format_dt(self.created_at)},
            {"provider_display_name": self.provider_display_name},
        ])
        return element
626883
public void xmlWriteOn(FormattedWriter writer) throws IOException
    {
        writer.newLine();
        writer.startTag(XML_ITEM_MAP);
        writer.indent();
        for (int i = 0; null != _entry && i < _entry.length; i++) // 666212
        {
            AbstractItemLink ail = _entry[i];
            while (null != ail)
            {
                writer.newLine();
                ail.xmlShortWriteOn(writer);
                ail = ail.getNextMappedLink();
            }
        }
        writer.outdent();
        writer.newLine();
        writer.endTag(XML_ITEM_MAP);
    }
1096206
def WriteXml(self, w, option, elementName=None):
		
		if elementName == None:
			x = w.createElement(self.classId)
		else:
			x = w.createElement(elementName)

		for prop in self.__dict__['properties']:
			x.setAttribute(UcsUtils.WordL(prop), self.__dict__['properties'][prop])
		x_child = self.childWriteXml(w, option)
		for xc in x_child:
			if (xc != None):
				x.appendChild(xc)
		return x
1218443
void writeTo(SAXDelegate saxDelegate)throws SAXException{
        XMLDocument xml = new XMLDocument(saxDelegate);
        xml.startDocument();
        write(input, xml);
        xml.endDocument();
    }
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);
  }
225791
public void xmlWriteOn(FormattedWriter writer) throws IOException
  {
    writer.newLine();
    writer.taggedValue("remoteMEUuid", remoteMEUuid);
    writer.newLine();
    writer.taggedValue("streamID", streamID);
    writer.newLine();
    writer.taggedValue("initialData", initialData);
    writer.newLine();
    writer.taggedValue("type", type);
  }
892855
def write_xml(xml)
      fname = "#{@appliance_name}.xml"
      File.open("#{@dir.tmp}/#{fname}", 'w'){|f| f.write(xml)}
      register_deliverable(:xml => fname)
    end
783757
public void writeXml(OutputStream out) throws IOException {
        Properties properties = getProps();
        try {
            Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
            Element conf = doc.createElement("configuration");
            doc.appendChild(conf);
            conf.appendChild(doc.createTextNode("\n"));
            for (Enumeration e = properties.keys(); e.hasMoreElements();) {
                String name = (String) e.nextElement();
                Object object = properties.get(name);
                String value;
                if (object instanceof String) {
                    value = (String) object;
                } else {
                    continue;
                }
                Element propNode = doc.createElement("property");
                conf.appendChild(propNode);

                Element nameNode = doc.createElement("name");
                nameNode.appendChild(doc.createTextNode(name));
                propNode.appendChild(nameNode);

                Element valueNode = doc.createElement("value");
                valueNode.appendChild(doc.createTextNode(value));
                propNode.appendChild(valueNode);

                conf.appendChild(doc.createTextNode("\n"));
            }

            DOMSource source = new DOMSource(doc);
            StreamResult result = new StreamResult(out);
            TransformerFactory transFactory = TransformerFactory.newInstance();
            Transformer transformer = transFactory.newTransformer();
            transformer.transform(source, result);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
809663
public void write(XMLStreamWriter writer) throws XMLStreamException {
      for (Attribute<?> attr : attributes.values()) {
         if (attr.isPersistent())
            attr.write(writer, attr.getAttributeDefinition().xmlName());
      }
   }
444180
def output_xml(data, code, headers=None):
    """"""
    resp = make_response(dumps({'response' :data}), code)
    resp.headers.extend(headers or {})
    return resp
353155
public static void serialize(Element element, Writer w) {
        Source source = new DOMSource(element);
        serialize(source, w);
    }
28432
public void xmlWriteOn(FormattedWriter writer) throws IOException
  {
    writer.newLine();
    writer.taggedValue("streamId", _streamId);
    writer.taggedValue("streamKey", _streamKey);
  }
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")
1357792
def write_xml(xml, output_file=None):
        """"""
        gen_filename = "requirements-{:%Y%m%d%H%M%S}.xml".format(datetime.datetime.now())
        utils.write_xml(xml, output_loc=output_file, filename=gen_filename)