code: public static Element writeRoadSegment(RoadSegment primitive, XMLBuilder builder, XMLResources resources) throws IOException {
  		if (primitive instanceof RoadPolyline) {
  			return writeRoadPolyline((RoadPolyline) primitive, builder, resources);
  		}
  		throw new IOException("unsupported type of primitive: " + primitive); //$NON-NLS-1$
  	}
docs: Write the XML description for the given road.
  
  @param primitive is the road to output.
  @param builder is the tool to create XML nodes.
  @param resources is the tool that permits to gather the resources.
  @return the XML node of the map element.
  @throws IOException in case of error.