public void store(Element root){
  root.addContent(new Element(Xml.OPTIONS));
  Element values;
  List<String> names=getKernelNameList();
  if (Control.backwardCompatible) {
    root.addContent(values=new Element(Xml.KERNELS));
    for (    String name : names) {
      String kernelNames=name + "%%";
      values.addContent(kernelNames);
    }
  }
  Element kernels=new Element(Xml.NEW_KERNELS);
  for (  String name : names) {
    Element kernel=new Element(Xml.KERNEL);
    kernel.setAttribute(new Attribute(Xml.NAME,name));
    kernels.addContent(kernel);
  }
  root.addContent(kernels);
  root.addContent(values=new Element(Xml.CARS));
  List<RollingStock> carList=getByIdList();
  for (  RollingStock rs : carList) {
    Car car=(Car)rs;
    values.addContent(car.store());
  }
}

public void store ( Element root ) { root . addContent ( new Element ( Xml . OPTIONS ) ) ; Element values ; List < String > names = getKernelNameList ( ) ; if ( Control . backwardCompatible ) { root . addContent ( values = new Element ( Xml . KERNELS ) ) ; for ( String name : names ) { String kernelNames = name + "%%" ; values . addContent ( kernelNames ) ; } } Element kernels = new Element ( Xml . NEW_KERNELS ) ; for ( String name : names ) { Element kernel = new Element ( Xml . KERNEL ) ; kernel . setAttribute ( new Attribute ( Xml . NAME , name ) ) ; kernels . addContent ( kernel ) ; } root . addContent ( kernels ) ; root . addContent ( values = new Element ( Xml . CARS ) ) ; List < RollingStock > carList = getByIdList ( ) ; for ( RollingStock rs : carList ) { Car car = ( Car ) rs ; values . addContent ( car . store ( ) ) ; } }
create an xml element to represent this entry . this member has to remain synchronized with the detailed dtd in operations - cars . dtd .
