code: public void save(final XmlWriter w) throws KNXMLException
  	{
  		/* XML layout:
  		 <datapoint stateBased=[true|false] name=string mainNumber=int dptID=string
  		 priority=string>
  		 knxAddress
  		 ...
  		 </datapoint>
  		*/
  		w.writeStartElement(TAG_DATAPOINT);
  		w.writeAttribute(ATTR_STATEBASED, Boolean.toString(stateBased));
  		w.writeAttribute(ATTR_NAME, name);
  		w.writeAttribute(ATTR_MAINNUMBER, Integer.toString(mainNo));
  		w.writeAttribute(ATTR_DPTID, dptId == null ? "" : dptId);
  		w.writeAttribute(ATTR_PRIORITY, priority.toString());
  		main.save(w);
  		doSave(w);
  		w.writeEndElement();
  	}
docs: Saves this datapoint in XML format to the supplied XML writer.
  
  @param w a XML writer
  @throws KNXMLException on error saving this datapoint