Saves this datapoint in XML format to the supplied XML writer.
<p>

@param w a XML writer
@throws KNXMLException on error saving this datapoint
428449
public void save(XMLWriter w) throws KNXMLException
	{
		/* XML layout:
		 <datapoint stateBased=[true|false] name=string mainNumber=int dptID=string
		 priority=string>
		 knxAddress
		 ...
		 </datapoint>
		*/
		final List att = new ArrayList();
		att.add(new Attribute(ATTR_STATEBASED, Boolean.toString(stateBased)));
		att.add(new Attribute(ATTR_NAME, name));
		att.add(new Attribute(ATTR_MAINNUMBER, Integer.toString(mainNo)));
		att.add(new Attribute(ATTR_DPTID, dptID == null ? "" : dptID));
		att.add(new Attribute(ATTR_PRIORITY, priority.toString()));
		w.writeElement(TAG_DATAPOINT, att, null);
		main.save(w);
		doSave(w);
		w.endElement();
	}
618888
void doLoad(XMLReader r) throws KNXMLException
	{
		boolean main = false;
		while (r.getPosition() == XMLReader.START_TAG) {
			final String tag = r.getCurrent().getName();
			if (tag.equals(TAG_EXPIRATION)) {
				final String a = r.getCurrent().getAttribute(ATTR_TIMEOUT);
				if (a != null)
					try {
						timeout = Integer.decode(a).intValue();
					}
					catch (final NumberFormatException e) {
						throw new KNXMLException("malformed attribute timeout, " + a,
							null, r.getLineNumber());
					}
			}
			else if (tag.equals(TAG_UPDATING))
				while (r.read() == XMLReader.START_TAG)
					updating.add(new GroupAddress(r));
			else if (tag.equals(TAG_INVALIDATING))
				while (r.read() == XMLReader.START_TAG)
					invalidating.add(new GroupAddress(r));
			else if (!main) {
				super.doLoad(r);
				main = true;
			}
			else
				throw new KNXMLException("invalid element", tag, r.getLineNumber());
			r.read();
		}
	}
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);
    }
1169677
public static void save(final AnnotationMappingInfo xmlInfo, final Writer writer) throws XmlOperateException {
        ArgUtils.notNull(xmlInfo, "xmlInfo");
        ArgUtils.notNull(writer, "writer");
        
        try {
            JAXB.marshal(xmlInfo, writer);
            
        } catch (DataBindingException e) {
            throw new XmlOperateException("fail save xml with JAXB.", e);
        }
        
    }
322185
public void writeXML(OutputStream outputStream, String encoding, String indent, String lineSeparator)
  throws IOException {
    XMLOutputter outputter = new XMLOutputter();
    Format format = Format.getPrettyFormat();
    format.setEncoding(encoding);
    format.setIndent(indent);
    format.setLineSeparator(lineSeparator);
    outputter.setFormat(format);
    outputter.output(getDocument(), outputStream);
  }
676837
public static void writeXML(Document xmldocument, OutputStream stream) throws IOException {
		assert xmldocument != null : AssertMessages.notNullParameter(0);
		assert stream != null : AssertMessages.notNullParameter(1);
		writeNode(xmldocument, stream);
	}
1122611
@Override
    public void writeFragmentTo(MwsWriter w) {
        w.write("Locale", locale);
        w.write("Text", text);
    }
531557
public void xmlWriteOn(FormattedWriter writer) throws IOException {

        DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd @ HH:mm:ss.SSS");
        String timeNow = dateFormat.format(new Date());
        writer.newLine();
        writer.startTag(XML_CACHE_LOADER);
        writer.indent();

        writer.newLine();
        writer.taggedValue("timeNow", timeNow);
        writer.newLine();
        writer.taggedValue("interval", interval);
        writer.newLine();
        writer.taggedValue("enabled", Boolean.valueOf(enabled));
        writer.newLine();
        writer.taggedValue("maxStreamsPerCycle", maxStreamsPerCycle);
        writer.newLine();
        writer.taggedValue("loaderStartTime", dateFormat.format(new Date(loaderStartTime)));
        writer.newLine();
        writer.taggedValue("loaderStopTime", dateFormat.format(new Date(loaderStopTime)));
        writer.newLine();
        writer.taggedValue("totalStreams", totalStreams);
        writer.newLine();

        for (int i = 0; i < MAX_DIAG_LOG; i++)
        {
            String str =
            "Cycle="
            + i
            + (diagIndex == i ? ":*" : ": ")
            + dateFormat.format(new Date(cycleTime[i]))
            + " streamsLoaded="
            + logStreamsLoaded[i]
            + " duration="
            + logDuration[i];
            writer.taggedValue("info", str);
            writer.newLine();
        }

        writer.startTag(XML_STORED_EXCEPTION);
        if (lastException == null)
        {
            writer.write("No exceptions recorded");
        }
        else
        {
            writer.indent();
            writer.newLine();
            writer.taggedValue("time", new Date(lastExceptionTime));
            writer.outdent();
            writer.write(lastException);
            writer.newLine();
        }
        writer.endTag(XML_STORED_EXCEPTION);

        writer.outdent();
        writer.newLine();
        writer.endTag(XML_CACHE_LOADER);
    }
390415
public void xmlWriteOn(FormattedWriter writer) throws IOException 
    {
        writer.newLine();
        writer.startTag(XML_ITEM_MAP);
        writer.indent();
        for (int i = 0; i < _subMaps.length; i++)
        {
            Iterator iterator = _subMaps[i].values().iterator();
            while (iterator.hasNext())
            {
                writer.newLine();
                AbstractItemLink ail = (AbstractItemLink) iterator.next();
                ail.xmlShortWriteOn(writer);
            }
        }
        writer.outdent();
        writer.newLine();
        writer.endTag(XML_ITEM_MAP);
    }
748832
public void store(Activation metadata, XMLStreamWriter writer) throws Exception
   {
      if (metadata != null && writer != null)
      {
         writer.writeStartElement(XML.ELEMENT_IRONJACAMAR);
         storeCommon(metadata, writer);
         writer.writeEndElement();
      }
   }
478250
public function writeXML( \XMLWriter $w, string $elementName = 'ImageSizeReducers' )
   {
      
      if ( ! empty( $elementName ) )
      {
         $w->startElement( $elementName );
      }
      
      foreach ( $this as $reducer )
      {
         if ( \is_null( $reducer ) || ! ( $reducer instanceof ImageSizeReducer ) )
         {
            continue;
         }
         $reducer->writeXML( $w );
      }
      
      if ( ! empty( $elementName ) )
      {
         $w->endElement();
      }
      
   }
521292
def writeXML(self, n):
        
        self.stream.write(TYPE_XMLSTRING)
        ref = self.context.getObjectReference(n)

        if ref != -1:
            self._writeInteger(ref << 1)

            return

        self.context.addObject(n)

        self.serialiseString(xml.tostring(n).encode('utf-8'))
809663
public void write(XMLStreamWriter writer) throws XMLStreamException {
      for (Attribute<?> attr : attributes.values()) {
         if (attr.isPersistent())
            attr.write(writer, attr.getAttributeDefinition().xmlName());
      }
   }
355228
public void save(XMLStreamWriter stream) throws XMLStreamException {
        stream.writeStartDocument("UTF-8", "1.0");
        
        saveInternal(stream);
        
        stream.writeEndDocument();
    }
979806
public void writeElement(String name, List att, String content) throws KNXMLException
	{
		try {
			final Tag tag = new Tag(name, att, content, false);
			layout.push(tag);
		}
		catch (final IOException e) {
			throw new KNXMLException(e.getMessage());
		}
	}
959516
public void toXml(final Writer wtr) throws ConfigException {
    try {
      XmlEmit xml = new XmlEmit();
      xml.addNs(new NameSpace(ns, "BW"), true);
      xml.startEmit(wtr);

      dump(xml, false);
      xml.flush();
    } catch (ConfigException cfe) {
      throw cfe;
    } catch (Throwable t) {
      throw new ConfigException(t);
    }
  }
279810
@Override
    public void writeXML(XMLOutput xmlOutput) throws IOException {
        xmlOutput.openTag(ELEMENT_NAME, new XMLAttributeList().addAttribute("class", className));
        for (Iterator<String> i = featureIterator(); i.hasNext();) {
            String feature = i.next();
            xmlOutput.openCloseTag(FEATURE_ELEMENT_NAME, new XMLAttributeList().addAttribute("value", feature));
        }
        xmlOutput.closeTag(ELEMENT_NAME);
    }